Ejemplo n.º 1
0
        private void TestsAddRemove(Channel c1)
        {
            CommunicationContainer mContainer
                = new CommunicationContainer(new CommunicationPolicy()
            {
                AutoCreateChannels = true
            });

            Assert.IsTrue(mContainer.Add(c1));

            Assert.IsTrue(mContainer.Channels.Count() == 1);

            Assert.IsTrue(mContainer.Exists(c1.Id, c1.Direction));

            Assert.IsTrue(mContainer.Remove(c1));

            Assert.IsFalse(mContainer.Exists(c1.Id, c1.Direction));

            Assert.IsTrue(mContainer.Channels.Count() == 0);
        }