コード例 #1
0
        public void TestGetChannelIsCached()
        {
            ChannelBase channel1 = factory.GetChannel(config);
            ChannelBase channel2 = factory.GetChannel(config);

            Assert.AreSame(channel1, channel2);
        }
コード例 #2
0
        public void TestGetChannelIsCached()
        {
            Channel channel1 = CachedChannelFactory.GetChannel(config);
            Channel channel2 = CachedChannelFactory.GetChannel(config);

            Assert.AreEqual(channel1, channel2);
        }
コード例 #3
0
        public void TestGetChannelRemovesClosedChannels()
        {
            Channel channel1 = CachedChannelFactory.GetChannel(config);

            channel1.ShutdownAsync().Wait();

            Channel channel2 = CachedChannelFactory.GetChannel(config);

            Assert.AreNotEqual(channel1, channel2);
        }