Examples of CamelResponseHandler


Examples of org.switchyard.component.camel.switchyard.CamelResponseHandler

        _messageComposer = CamelComposition.getMessageComposer();
    }

    @Test (expected = RuntimeException.class)
    public void constructor() throws Exception {
        final CamelResponseHandler responseHandler = new CamelResponseHandler(null, null, _messageComposer);
        responseHandler.handleMessage(null);
    }
View Full Code Here

Examples of org.switchyard.component.camel.switchyard.CamelResponseHandler

                when(message.getContext()).thenReturn(new DefaultContext(Scope.MESSAGE));
                when(message.getContent(Integer.class)).thenReturn(10);
                return message;
            }
        });
        final CamelResponseHandler responseHandler = new CamelResponseHandler(camelExchange, serviceReference, _messageComposer);

        responseHandler.handleMessage(switchYardExchange);

        assertThat(switchYardExchange.getMessage().getContent(Integer.class), is(equalTo(new Integer(10))));
    }
View Full Code Here

Examples of org.switchyard.component.camel.switchyard.CamelResponseHandler

                when(message.getContext()).thenReturn(new DefaultContext(Scope.MESSAGE));
                when(message.getContent()).thenReturn(fault);
                return message;
            }
        });
        final CamelResponseHandler responseHandler = new CamelResponseHandler(camelExchange, serviceReference, _messageComposer);

        responseHandler.handleFault(switchYardExchange);

        assertTrue(camelExchange.getIn().isFault());
        assertSame(fault, camelExchange.getIn().getBody());
    }
View Full Code Here

Examples of org.switchyard.component.camel.switchyard.CamelResponseHandler

                Message message = mock(Message.class);
                when(message.getContent()).thenReturn(exception);
                return message;
            }
        });
        final CamelResponseHandler responseHandler = new CamelResponseHandler(camelExchange, serviceReference, _messageComposer);

        responseHandler.handleFault(switchYardExchange);
        assertSame(exception, camelExchange.getException());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.