amlClient.test.ts 882 Bytes
Newer Older
SparkSnail's avatar
SparkSnail committed
1
2
3
4
5
6
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import * as chai from 'chai';
import { cleanupUnitTest, prepareUnitTest } from '../../../common/utils';
import chaiAsPromised = require("chai-as-promised");
liuzhe-lz's avatar
liuzhe-lz committed
7
import { AMLClient } from '../../../training_service/reusable/aml/amlClient';
SparkSnail's avatar
SparkSnail committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29


describe('Unit Test for amlClient', () => {

    before(() => {
        chai.should();
        chai.use(chaiAsPromised);
        prepareUnitTest();
    });

    after(() => {
        cleanupUnitTest();
    });

    it('test parseContent', async () => {

        let amlClient: AMLClient = new AMLClient('', '', '', '', '', '', '', '');
    
        chai.assert.equal(amlClient.parseContent('test', 'test:1234'), '1234', "The content should be 1234");
        chai.assert.equal(amlClient.parseContent('test', 'abcd:1234'), '', "The content should be null");
    });
});