public void Remove_WithUnaddedAddress_DoesNothing() { // Arrange var socket = new RouterSocket(); var receiver = new NetMQReceiver(socket, messageFactory, requestDispatcher); // Act TestDelegate test = () => receiver.RemoveAddress(TcpAddress.Wildcard(5555)); // Assert Assert.That(test, Throws.Nothing); // Cleanup receiver.Dispose(); }
public void Remove_WithAddedAddress_IsConnectedFalse() { // Arrange var socket = new RouterSocket(); var receiver = new NetMQReceiver(socket, messageFactory, requestDispatcher); var address = TcpAddress.Wildcard(5555); receiver.AddAddress(address); // Act receiver.RemoveAddress(address); // Assert Assert.That(receiver.IsConnected, Is.False); // Cleanup receiver.Dispose(); }
public void Remove_WithAddedAddress_RemovesAddress() { // Arrange var socket = new RouterSocket(); var receiver = new NetMQReceiver(socket, messageFactory, requestDispatcher); var address = TcpAddress.Wildcard(5555); receiver.AddAddress(address); // Act receiver.RemoveAddress(address); // Assert CollectionAssert.DoesNotContain(receiver.Addresses, address); // Cleanup receiver.Dispose(); }