コード例 #1
0
        public void RemoveHost_GivenDoesNotHaveHostName_ThrowsRpcException()
        {
            var hostDistributor = new HostDistributor();

            hostDistributor.AddHost("https://www.somehost.com");

            Assert.Throws <RpcException>(() => hostDistributor.RemoveHost("https://www.OtherHost.com"));
        }
コード例 #2
0
        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"));
        }
コード例 #3
0
        public void RemoveHost_InvalidHostName_ThrowsRpcException(string host)
        {
            var hostDistributor = new HostDistributor();

            Assert.Throws <RpcException>(() => hostDistributor.RemoveHost(host));
        }