import { ConfigParams } from 'pip-services3-commons-nodex'; import { CurrentPostStatesCommandableClientV1 } from '../../src/version1/CurrentPostStatesCommandableClientV1'; import { CurrentPostStatesFixture } from './CurrentPostStatesFixture'; suite('CurrentPostStatesCommandableClientV1', () => { let client: CurrentPostStatesCommandableClientV1; let fixture: CurrentPostStatesFixture; let serviceHost = process.env['STATES_SERVICE_HOST'] || 'localhost'; let servicePort = process.env['STATES_SERVICE_PORT'] || '8080'; if (serviceHost == null || servicePort == null) return; setup(async () => { client = new CurrentPostStatesCommandableClientV1(); client.configure(ConfigParams.fromTuples( "connection.protocol", "http", "connection.port", servicePort, "connection.host", serviceHost, )); await client.open(null); fixture = new CurrentPostStatesFixture(client); }); teardown(async () => { await client.close(null); }); test('CRUD Operations', async () => { await fixture.testCrudOperations(); }); });