public void RemoveHost_GivenDoesNotHaveHostName_ThrowsRpcException() { var hostDistributor = new HostDistributor(); hostDistributor.AddHost("https://www.somehost.com"); Assert.Throws <RpcException>(() => hostDistributor.RemoveHost("https://www.OtherHost.com")); }
public void RemoveHost_GivenHasHostName_RemovesHostName() { var hostDistributor = new HostDistributor(); hostDistributor.AddHost("https://www.somehost.com"); hostDistributor.RemoveHost("https://www.somehost.com"); Assert.IsFalse(hostDistributor.HasHost("https://www.somehost.com")); }
public void RemoveHost_InvalidHostName_ThrowsRpcException(string host) { var hostDistributor = new HostDistributor(); Assert.Throws <RpcException>(() => hostDistributor.RemoveHost(host)); }