public void ResolveArgument()
        {
            var vars = new Dictionary <string, object>();

            vars.Add("foo", "bar");
            vars.Add("name", "value");

            var message = MessageBuilder <byte[]> .WithPayload(new byte[0]).SetHeader(DestinationVariableMethodArgumentResolver.DESTINATION_TEMPLATE_VARIABLES_HEADER, vars).Build();

            var param  = resolvable.Annot(MessagingPredicates.DestinationVar().NoName()).Arg();
            var result = resolver.ResolveArgument(param, message);

            Assert.Equal("bar", result);

            param  = resolvable.Annot(MessagingPredicates.DestinationVar("name")).Arg();
            result = resolver.ResolveArgument(param, message);
            Assert.Equal("value", result);
        }
        public void ResolveArgumentNotFound()
        {
            var message = MessageBuilder <byte[]> .WithPayload(new byte[0]).Build();

            Assert.Throws <MessageHandlingException>(() => resolver.ResolveArgument(resolvable.Annot(MessagingPredicates.DestinationVar().NoName()).Arg(), message));
        }
 public void SupportsParameter()
 {
     Assert.True(resolver.SupportsParameter(resolvable.Annot(MessagingPredicates.DestinationVar().NoName()).Arg()));
     Assert.False(resolver.SupportsParameter(resolvable.AnnotNotPresent(typeof(DestinationVariableAttribute)).Arg()));
 }