private void TestChannelAutocreateFail(ChannelDirection direction) { CommunicationContainer mContainer = new CommunicationContainer(new CommunicationPolicy() { AutoCreateChannels = false }); Channel channel = null; Assert.IsFalse(mContainer.TryGet("Freddy", direction, out channel)); Assert.IsTrue(channel == null); Assert.IsFalse(mContainer.Exists("Freddy", direction)); Assert.IsTrue(mContainer.Channels.Count() == 0); }
private void TestChannelAutocreateSuccess(ChannelDirection direction) { CommunicationContainer mContainer = new CommunicationContainer(new CommunicationPolicy() { AutoCreateChannels = true }); Channel channel; Assert.IsTrue(mContainer.TryGet("Freddy", direction, out channel)); Assert.IsTrue(mContainer.Exists("Freddy", direction)); Assert.IsTrue(channel.IsAutoCreated); Assert.IsTrue(mContainer.Channels.Count() == 1); }