use of io.atlasmap.json.test.TargetFlatPrimitive in project atlasmap by atlasmap.
the class JsonJsonAutoConversionTest method testProcessJsonJsonFlatFieldMappingAutoConversion7.
@Test
public void testProcessJsonJsonFlatFieldMappingAutoConversion7() throws Exception {
TargetFlatPrimitive targetObject = executeMapping("src/test/resources/jsonToJson/atlasmapping-flatprimitive-unrooted-autoconversion-7.json");
AtlasTestUtil.validateJsonFlatPrimitivePrimitiveFieldAutoConversion7(targetObject);
}
use of io.atlasmap.json.test.TargetFlatPrimitive in project atlasmap by atlasmap.
the class JsonJsonAutoConversionTest method testProcessJsonJsonFlatFieldMappingAutoConversion5.
@Test
public void testProcessJsonJsonFlatFieldMappingAutoConversion5() throws Exception {
TargetFlatPrimitive targetObject = executeMapping("src/test/resources/jsonToJson/atlasmapping-flatprimitive-unrooted-autoconversion-5.json");
AtlasTestUtil.validateJsonFlatPrimitivePrimitiveFieldAutoConversion5(targetObject);
}
use of io.atlasmap.json.test.TargetFlatPrimitive in project atlasmap by atlasmap.
the class JsonJsonAutoConversionTest method testProcessJsonJsonFlatFieldMappingAutoConversion6.
@Test
public void testProcessJsonJsonFlatFieldMappingAutoConversion6() throws Exception {
TargetFlatPrimitive targetObject = executeMapping("src/test/resources/jsonToJson/atlasmapping-flatprimitive-unrooted-autoconversion-6.json");
AtlasTestUtil.validateJsonFlatPrimitivePrimitiveFieldAutoConversion6(targetObject);
}
use of io.atlasmap.json.test.TargetFlatPrimitive in project atlasmap by atlasmap.
the class JsonJsonAutoConversionTest method testProcessJsonJsonFlatFieldMappingAutoConversion2.
@Test
public void testProcessJsonJsonFlatFieldMappingAutoConversion2() throws Exception {
TargetFlatPrimitive targetObject = executeMapping("src/test/resources/jsonToJson/atlasmapping-flatprimitive-unrooted-autoconversion-2.json");
AtlasTestUtil.validateJsonFlatPrimitivePrimitiveFieldAutoConversion2(targetObject);
}
use of io.atlasmap.json.test.TargetFlatPrimitive in project atlasmap by atlasmap.
the class JsonJsonFlatMappingTest method testProcessJsonJsonFlatPrimitiveRooted.
@Test
public void testProcessJsonJsonFlatPrimitiveRooted() throws Exception {
AtlasContext context = atlasContextFactory.createContext(new File("src/test/resources/jsonToJson/atlasmapping-flatprimitive-rooted.json"));
AtlasSession session = context.createSession();
String source = AtlasTestUtil.loadFileAsString("src/test/resources/jsonToJson/atlas-json-flatprimitive-rooted.json");
session.setDefaultSourceDocument(source);
context.process(session);
Object object = session.getDefaultTargetDocument();
assertNotNull(object);
assertTrue(object instanceof String);
AtlasJsonTestRootedMapper testMapper = new AtlasJsonTestRootedMapper();
TargetFlatPrimitive targetObject = testMapper.readValue((String) object, TargetFlatPrimitive.class);
AtlasTestUtil.validateJsonFlatPrimitivePrimitiveFields(targetObject);
}
Aggregations