public void StopAsync() { Listener newListener = transport.MakeListener(address); Assert.True(newListener == transport.GetListener(address)); transport.StopAsync(); Assert.False(transport.ListenerExists(address)); transport.MakeListener(address); Assert.True(transport.ListenerExists(address)); }
public async Task DefaultSetup(IService service, int count) { transport = transportBuilder.Construct(); listener = (SimpleInMemListener)transport.MakeListener(address); listener.AddService(service); await listener.StartAsync(); connections = new SimpleInMemConnection[count]; for (int connectionIndex = 0; connectionIndex < count; connectionIndex++) { connections[connectionIndex] = (SimpleInMemConnection)await transport.ConnectToAsync(address, System.Threading.CancellationToken.None); Assert.IsTrue(connections[connectionIndex].IsConnected); Assert.IsTrue(connections[connectionIndex].IsPaired); } }
public async Task DefaultSetup(IService service, int count) { transport = transportBuilder.Construct(); listener = (SimpleInMemListener)transport.MakeListener(address); listener.AddService(service); await listener.StartAsync(); connections = new SimpleInMemConnection[count]; for (int connectionIndex = 0; connectionIndex < count; connectionIndex++) { connections[connectionIndex] = (SimpleInMemConnection)await transport.ConnectToAsync(address, System.Threading.CancellationToken.None); Assert.IsTrue(connections[connectionIndex].IsConnected); Assert.IsTrue(connections[connectionIndex].IsPaired); } }
public void CreateInMemTransportListener() { var listener = transport.MakeListener(address); Assert.IsNotNull(listener); }