use of bind.feature.generichierarchy.case1.model.Message in project camel by apache.
the class MessageValidatorTest method testDefaultValidationContext.
@Test
public void testDefaultValidationContext() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:test1");
mock.expectedMessageCount(1);
Message msg = createADT01Message();
template.sendBody("direct:test1", msg);
assertMockEndpointsSatisfied();
}
use of bind.feature.generichierarchy.case1.model.Message in project camel by apache.
the class MessageValidatorTest method testDynamicDefaultHapiContext.
@Test
public void testDynamicDefaultHapiContext() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:test6");
mock.expectedMessageCount(1);
Message msg = createADT01Message();
msg.setParser(defaultContext.getPipeParser());
template.sendBody("direct:test6", msg);
assertMockEndpointsSatisfied();
}
use of bind.feature.generichierarchy.case1.model.Message in project camel by apache.
the class HL7MLLPCodecTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("mina2:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec").process(new Processor() {
public void process(Exchange exchange) throws Exception {
Message input = exchange.getIn().getBody(Message.class);
assertEquals("2.4", input.getVersion());
QRD qrd = (QRD) input.get("QRD");
assertEquals("0101701234", qrd.getWhoSubjectFilter(0).getIDNumber().getValue());
Message response = createHL7AsMessage();
exchange.getOut().setBody(response);
}
}).to("mock:result");
}
};
}
use of bind.feature.generichierarchy.case1.model.Message in project camel by apache.
the class HL7MLLPNettyCodecTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("netty4:tcp://127.0.0.1:" + getPort() + "?sync=true&decoder=#hl7decoder&encoder=#hl7encoder").process(new Processor() {
public void process(Exchange exchange) throws Exception {
Message input = exchange.getIn().getBody(Message.class);
assertEquals("2.4", input.getVersion());
QRD qrd = (QRD) input.get("QRD");
assertEquals("0101701234", qrd.getWhoSubjectFilter(0).getIDNumber().getValue());
Message response = createHL7AsMessage();
exchange.getOut().setBody(response);
}
}).to("mock:result");
}
};
}
use of bind.feature.generichierarchy.case1.model.Message in project camel by apache.
the class HL7MLLPNettyDecoderResourceLeakTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
public void configure() throws Exception {
from("netty4:tcp://127.0.0.1:" + getPort() + "?decoder=#hl7decoder&encoder=#hl7encoder").process(new Processor() {
public void process(Exchange exchange) throws Exception {
Message input = exchange.getIn().getBody(Message.class);
exchange.getOut().setBody(input.generateACK());
}
}).to("mock:result");
}
};
}
Aggregations