public PricesHttpClientV1Test() { _persistence = new PricesMemoryPersistence(); _controller = new PricesController(); _client = new PricesHttpClientV1(); _service = new PricesHttpServiceV1(); IReferences references = References.FromTuples( new Descriptor("prices", "persistence", "memory", "default", "1.0"), _persistence, new Descriptor("prices", "controller", "default", "default", "1.0"), _controller, new Descriptor("prices", "client", "http", "default", "1.0"), _client, new Descriptor("prices", "service", "http", "default", "1.0"), _service ); _controller.SetReferences(references); _service.Configure(HttpConfig); _service.SetReferences(references); _client.Configure(HttpConfig); _client.SetReferences(references); _fixture = new PricesClientV1Fixture(_client); _service.OpenAsync(null).Wait(); _client.OpenAsync(null).Wait(); }
public PricesControllerTest() { _persistence = new PricesMemoryPersistence(); _persistence.Configure(new ConfigParams()); _controller = new PricesController(); var references = References.FromTuples( new Descriptor("prices", "persistence", "memory", "*", "1.0"), _persistence, new Descriptor("prices", "controller", "default", "*", "1.0"), _controller ); _controller.SetReferences(references); _persistence.OpenAsync(null).Wait(); }
public PricesDirectClientV1Test() { _persistence = new PricesMemoryPersistence(); _controller = new PricesController(); _client = new PricesDirectClientV1(); IReferences references = References.FromTuples( new Descriptor("prices", "persistence", "memory", "default", "1.0"), _persistence, new Descriptor("prices", "controller", "default", "default", "1.0"), _controller, new Descriptor("prices", "client", "direct", "default", "1.0"), _client ); _controller.SetReferences(references); _client.SetReferences(references); _fixture = new PricesClientV1Fixture(_client); _client.OpenAsync(null).Wait(); }
public PricesHttpServiceV1Test() { _persistence = new PricesMemoryPersistence(); _controller = new PricesController(); _service = new PricesHttpServiceV1(); IReferences references = References.FromTuples( new Descriptor("prices", "persistence", "memory", "default", "1.0"), _persistence, new Descriptor("prices", "controller", "default", "default", "1.0"), _controller, new Descriptor("prices", "service", "http", "default", "1.0"), _service ); _controller.SetReferences(references); _service.Configure(HttpConfig); _service.SetReferences(references); Task.Run(() => _service.OpenAsync(null)); Thread.Sleep(1000); }