public void emptyMap()
 {
     IDictionary<string, IMessageChannel> channelMap = new Dictionary<string, IMessageChannel>();
     MapBasedChannelResolver resolver = new MapBasedChannelResolver();
     resolver.ChannelMap = channelMap;
     IMessageChannel result = resolver.ResolveChannelName("testChannel");
     Assert.IsNull(result);
 }
 public void mapDoesNotContainChannel()
 {
     IMessageChannel testChannel = new QueueChannel();
     IDictionary<string, IMessageChannel> channelMap = new Dictionary<string, IMessageChannel>();
     channelMap.Add("testChannel", testChannel);
     MapBasedChannelResolver resolver = new MapBasedChannelResolver();
     resolver.ChannelMap = channelMap;
     IMessageChannel result = resolver.ResolveChannelName("noSuchChannel");
     Assert.IsNull(result);
 }
 public void mapContainsChannel()
 {
     IMessageChannel testChannel = new QueueChannel();
     IDictionary<string, IMessageChannel> channelMap = new Dictionary<string, IMessageChannel>();
     channelMap.Add("testChannel", testChannel);
     MapBasedChannelResolver resolver = new MapBasedChannelResolver();
     resolver.ChannelMap = channelMap;
     IMessageChannel result = resolver.ResolveChannelName("testChannel");
     Assert.IsNotNull(result);
     Assert.That(result, Is.EqualTo(testChannel));
 }
 public void NullMapRejected()
 {
     MapBasedChannelResolver resolver = new MapBasedChannelResolver();
     resolver.ChannelMap = null;
 }