use of io.atlasmap.java.test.SourceContact in project atlasmap by atlasmap.
the class AtlasMapMultiNSTest method test.
@Test
@DirtiesContext
public void test() throws Exception {
result.setExpectedCount(1);
ProducerTemplate producerTemplate = camelContext.createProducerTemplate();
SourceContact c = new SourceContact();
c.setFirstName("Jackson");
producerTemplate.sendBody("direct:start", c);
MockEndpoint.assertIsSatisfied(camelContext);
Message message = result.getExchanges().get(0).getIn();
Assert.assertEquals("application/xml", message.getHeader(Exchange.CONTENT_TYPE));
String out = message.getBody(String.class);
Assert.assertNotNull(out);
Diff d = DiffBuilder.compare(Input.fromString(XML_EXPECTED).build()).withTest(Input.fromString(out).build()).ignoreWhitespace().build();
Assert.assertFalse(d.toString() + ": " + out, d.hasDifferences());
}
use of io.atlasmap.java.test.SourceContact in project atlasmap by atlasmap.
the class ClassHelperTest method testParentObjectForPathParamChecking.
@Test
public void testParentObjectForPathParamChecking() throws Exception {
assertNull(ClassHelper.parentObjectForPath(null, null, true));
assertNull(ClassHelper.parentObjectForPath(null, new AtlasPath("foo.bar"), true));
SourceContact targetObject = new SourceContact();
Object parentObject = ClassHelper.parentObjectForPath(targetObject, null, true);
assertNotNull(parentObject);
assertTrue(parentObject instanceof SourceContact);
assertEquals(targetObject, parentObject);
}
Aggregations