public void should_return_IClientChannel() { var serviceClientFactory = new ServiceClientFactory(); var calculator = serviceClientFactory.CreateClient<ICalculator>(); IClientChannel clientChannel = calculator as IClientChannel; Assert.NotNull(clientChannel); }
/// <summary> /// Initializes a new instance of the <see cref="GetProductBulkPricesTest" /> class. /// </summary> public GetProductBulkPricesTest() { this.client = Substitute.For <IPricesServiceChannel>(); ServiceClientFactory clientFactory = Substitute.For <ServiceClientFactory>(); clientFactory.CreateClient <IPricesServiceChannel>(Arg.Any <string>(), Arg.Any <string>()).Returns(this.client); this.processor = new GetProductBulkPrices { ClientFactory = clientFactory }; }