public ComaniesHttpClientV1Test() { _persistence = new CompaniesMemoryPersistence(); _controller = new CompaniesController(); _client = new CompaniesHttpClientV1(); _service = new CompaniesHttpServiceV1(); IReferences references = References.FromTuples( new Descriptor("CompaniesService", "persistence", "memory", "default", "1.0"), _persistence, new Descriptor("CompaniesService", "controller", "default", "default", "1.0"), _controller, new Descriptor("CompaniesService", "client", "http", "default", "1.0"), _client, new Descriptor("CompaniesService", "service", "http", "default", "1.0"), _service ); _controller.SetReferences(references); _service.Configure(HttpConfig); _service.SetReferences(references); _client.Configure(HttpConfig); _client.SetReferences(references); _fixture = new CompaniesClientV1Fixture(_client); _service.OpenAsync(null).Wait(); _client.OpenAsync(null).Wait(); }
public CompaniesAuditControllerTest() { isIntegratedTestEnable = !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("HOST")); _controller = new CompaniesAuditController(); _client = new CompaniesHttpClientV1(); _client.Configure(ConfigParams.FromTuples( "connection.host", Environment.GetEnvironmentVariable("HOST"), "connection.port", Environment.GetEnvironmentVariable("PORT"), "connection.protocol", "http" )); _controller.Configure(ConfigParams.FromTuples( "mailsettings.body", "[BANKCODE][ACCCODE][STATECODE][IBAN][NAME][CONTRACTDATE][NOTE][EMPLOYEE_ID]" )); var references = References.FromTuples( new Descriptor("companies-audit", "controller", "default", "*", "1.0"), _controller, new Descriptor("companies-service", "client", "http", "default", "1.0"), _client ); _controller.SetReferences(references); _controller._sendMessageClient = new SendMessageNullHelper(); _client.OpenAsync(null).Wait(); }