public DestinationResolvingMessagingTemplateTest()
        {
            var resolver = new TestMessageChannelDestinationResolver();

            myChannel = new TaskSchedulerSubscribableChannel();
            resolver.RegisterMessageChannel("myChannel", myChannel);

            template = new TestDestinationResolvingMessagingTemplate();
            template.DestinationResolver = resolver;

            headers = new Dictionary <string, object>()
            {
                { "key", "value" }
            };

            postProcessor = new TestMessagePostProcessor();
        }
        public void SendNoDestinationResolver()
        {
            var template = new TestDestinationResolvingMessagingTemplate();

            Assert.Throws <InvalidOperationException>(() => template.Send("myChannel", new GenericMessage("payload")));
        }
 public async Task SendAsyncNoDestinationResolver()
 {
     var template = new TestDestinationResolvingMessagingTemplate();
     await Assert.ThrowsAsync <InvalidOperationException>(() => template.SendAsync("myChannel", new GenericMessage("payload")));
 }
        public Task SendAsyncNoDestinationResolver()
        {
            var template = new TestDestinationResolvingMessagingTemplate();

            return(Assert.ThrowsAsync <InvalidOperationException>(() => template.SendAsync("myChannel", Message.Create("payload"))));
        }