public void MessageAsMethodParameterAndMessageAsReturnValue() { MessageMappingMethodInvoker invoker = new MessageMappingMethodInvoker(new TestBean(), "AcceptMessageAndReturnMessage"); IMessage result = (IMessage) invoker.InvokeMethod(new StringMessage("testing")); Assert.That(result.Payload, Is.EqualTo("testing-4")); }
public void ConvertedPayloadWithAnnotatedMethod() { AnnotatedTestService service = new AnnotatedTestService(); MethodInfo method = service.GetType().GetMethod("IntegerMethod"); MessageMappingMethodInvoker invoker = new MessageMappingMethodInvoker(service, method); object result = invoker.InvokeMethod(new StringMessage("456")); Assert.That(result, Is.EqualTo(456)); }
public void MessageAndHeaderWithAnnotatedMethod() { AnnotatedTestService service = new AnnotatedTestService(); MethodInfo method = service.GetType().GetMethod("MessageAndHeader"); MessageMappingMethodInvoker invoker = new MessageMappingMethodInvoker(service, method); IMessage message = MessageBuilder.WithPayload("foo").SetHeader("number", 42).Build(); object result = invoker.InvokeMethod(message); Assert.That(result, Is.EqualTo("foo-42")); }
public void MessageAsMethodParameterAndObjectAsReturnValue() { MessageMappingMethodInvoker invoker = new MessageMappingMethodInvoker(new TestBean(), "AcceptMessageAndReturnObject"); object result = invoker.InvokeMethod(new StringMessage("testing")); Assert.That(result, Is.EqualTo("testing-3")); }
public ServiceActivatingHandler(object obj, MethodInfo method) { this.invoker = new MessageMappingMethodInvoker(obj, method); }
public MethodInvokingSplitter(object obj, MethodInfo method) { _invoker = new MessageMappingMethodInvoker(obj, method); }
public UIServiceActivatingHandler(object obj) { this.invoker = new MessageMappingMethodInvoker(obj, typeof(ServiceActivatorAttribute)); }
public MethodInvokingSelector(object obj, string methodName) { _invoker = new MessageMappingMethodInvoker(obj, methodName); }
public MethodInvokingTransformer(object obj, string methodName) { _invoker = new MessageMappingMethodInvoker(obj, methodName); }
public MethodInvokingTransformer(object obj) { _invoker = new MessageMappingMethodInvoker(obj, typeof(TransformerAttribute)); }
public MethodInvokingTransformer(object obj, MethodInfo method) { _invoker = new MessageMappingMethodInvoker(obj, method); }
public ServiceActivatingHandler(object obj, string methodName) { this.invoker = new MessageMappingMethodInvoker(obj, methodName); }
public MethodInvokingSplitter(object obj) { _invoker = new MessageMappingMethodInvoker(obj, typeof(SplitterAttribute)); }
public void MessageOnlyWithAnnotatedMethod() { AnnotatedTestService service = new AnnotatedTestService(); MethodInfo method = service.GetType().GetMethod("MessageOnly"); MessageMappingMethodInvoker invoker = new MessageMappingMethodInvoker(service, method); object result = invoker.InvokeMethod(new StringMessage("foo")); Assert.That(result, Is.EqualTo("foo")); }
public UIServiceActivatingHandler(object obj, MethodInfo method) { this.invoker = new MessageMappingMethodInvoker(obj, method); }
public MethodInvokingSelector(object obj, MethodInfo method) { _invoker = new MessageMappingMethodInvoker(obj, method); Type returnType = method.ReturnType; AssertUtils.IsTrue(typeof(bool).IsAssignableFrom(returnType), "MethodInvokingSelector method must return a boolean result."); }
public UIServiceActivatingHandler(object obj, string methodName, SynchronizationContext synchronizationContext) { this.invoker = new MessageMappingMethodInvoker(obj, methodName); }
public ServiceActivatingHandler(object obj) { this.invoker = new MessageMappingMethodInvoker(obj, typeof(ServiceActivatorAttribute)); }
public void PayloadAndHeaderAnnotationMethodParametersAndObjectAsReturnValue() { MessageMappingMethodInvoker invoker = new MessageMappingMethodInvoker(new TestBean(), "AcceptPayloadAndHeaderAndReturnObject"); IMessage request = MessageBuilder.WithPayload("testing").SetHeader("number", 123).Build(); object result = invoker.InvokeMethod(request); Assert.That(result, Is.EqualTo("testing-123")); }