Package org.apache.camel.component.mock

Examples of org.apache.camel.component.mock.MockEndpoint.expectedHeaderReceived()


        mock.expectedHeaderReceived("hl7.msh.sendingApplication", "MYSERVER");
        mock.expectedHeaderReceived("hl7.msh.sendingFacility", "MYSENDERAPP");
        mock.expectedHeaderReceived("hl7.msh.receivingApplication", "MYCLIENT");
        mock.expectedHeaderReceived("hl7.msh.receivingFacility", "MYCLIENTAPP");
        mock.expectedHeaderReceived("hl7.msh.timestamp", "200612211200");
        mock.expectedHeaderReceived("hl7.msh.security", null);
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageControl", "1234");
View Full Code Here


        mock.expectedHeaderReceived("hl7.msh.sendingFacility", "MYSENDERAPP");
        mock.expectedHeaderReceived("hl7.msh.receivingApplication", "MYCLIENT");
        mock.expectedHeaderReceived("hl7.msh.receivingFacility", "MYCLIENTAPP");
        mock.expectedHeaderReceived("hl7.msh.timestamp", "200612211200");
        mock.expectedHeaderReceived("hl7.msh.security", null);
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageControl", "1234");
        mock.expectedHeaderReceived("hl7.msh.processingId", "P");
View Full Code Here

        mock.expectedHeaderReceived("hl7.msh.receivingApplication", "MYCLIENT");
        mock.expectedHeaderReceived("hl7.msh.receivingFacility", "MYCLIENTAPP");
        mock.expectedHeaderReceived("hl7.msh.timestamp", "200612211200");
        mock.expectedHeaderReceived("hl7.msh.security", null);
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageControl", "1234");
        mock.expectedHeaderReceived("hl7.msh.processingId", "P");
        mock.expectedHeaderReceived("hl7.msh.versionId", "2.4");
View Full Code Here

        mock.expectedHeaderReceived("hl7.msh.receivingFacility", "MYCLIENTAPP");
        mock.expectedHeaderReceived("hl7.msh.timestamp", "200612211200");
        mock.expectedHeaderReceived("hl7.msh.security", null);
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageControl", "1234");
        mock.expectedHeaderReceived("hl7.msh.processingId", "P");
        mock.expectedHeaderReceived("hl7.msh.versionId", "2.4");
View Full Code Here

        mock.expectedHeaderReceived("hl7.msh.timestamp", "200612211200");
        mock.expectedHeaderReceived("hl7.msh.security", null);
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageControl", "1234");
        mock.expectedHeaderReceived("hl7.msh.processingId", "P");
        mock.expectedHeaderReceived("hl7.msh.versionId", "2.4");

        String body = createHL7AsString();
View Full Code Here

        mock.expectedHeaderReceived("hl7.msh.security", null);
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageControl", "1234");
        mock.expectedHeaderReceived("hl7.msh.processingId", "P");
        mock.expectedHeaderReceived("hl7.msh.versionId", "2.4");

        String body = createHL7AsString();
        template.sendBody("direct:unmarshal", body);
View Full Code Here

        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageControl", "1234");
        mock.expectedHeaderReceived("hl7.msh.processingId", "P");
        mock.expectedHeaderReceived("hl7.msh.versionId", "2.4");

        String body = createHL7AsString();
        template.sendBody("direct:unmarshal", body);
View Full Code Here

        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageType", "QRY");
        mock.expectedHeaderReceived("hl7.msh.triggerEvent", "A19");
        mock.expectedHeaderReceived("hl7.msh.messageControl", "1234");
        mock.expectedHeaderReceived("hl7.msh.processingId", "P");
        mock.expectedHeaderReceived("hl7.msh.versionId", "2.4");

        String body = createHL7AsString();
        template.sendBody("direct:unmarshal", body);

        assertMockEndpointsSatisifed();
View Full Code Here

    public void testExceptionIsLoggedWithCustomLogLevel() throws Exception {
        MockEndpoint result = getMockEndpoint(RESULT_QUEUE);
        result.expectedMessageCount(0);
        MockEndpoint mock = getMockEndpoint(ERROR_QUEUE);
        mock.expectedMessageCount(1);
        mock.expectedHeaderReceived(MESSAGE_INFO, "Damm somekind of IO exception");

        try {
            template.sendBody("direct:a", "Hello IO");
            fail("Should have thrown a IOException");
        } catch (RuntimeCamelException e) {
View Full Code Here

    public void testExceptionIsLoggedWithDefaultLevel() throws Exception {
        MockEndpoint result = getMockEndpoint(RESULT_QUEUE);
        result.expectedMessageCount(0);
        MockEndpoint mock = getMockEndpoint(ERROR_QUEUE);
        mock.expectedMessageCount(1);
        mock.expectedHeaderReceived(MESSAGE_INFO, "Damm a NPE");

        try {
            template.sendBody("direct:a", "Hello NPE");
            fail("Should have thrown a NullPointerException");
        } catch (RuntimeCamelException e) {
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.