public void TestDuplexService() { using (ServiceHost host = new ServiceHost(typeof(DuplexService))) { EndpointAddress address = new EndpointAddress(new Uri("net.threadless://test/DuplexService.svc")); CallbackService callbackService = new CallbackService(); using (var client = new ThreadlessDuplexClient <DuplexService, IDuplexService>(address, callbackService)) { client.Client.Ping("Hello"); callbackService.Text.Should().Be("Ping: Hello"); } } }
public void TestDuplexService() { using (ServiceHost host = new ServiceHost(typeof(DuplexService))) { EndpointAddress address = new EndpointAddress(new Uri("net.threadless://test/DuplexService.svc")); CallbackService callbackService = new CallbackService(); using (var client = new ThreadlessDuplexClient<DuplexService, IDuplexService>(address, callbackService)) { client.Client.Ping("Hello"); callbackService.Text.Should().Be("Ping: Hello"); } } }