Package org.candlepin.gutterball.jackson

Examples of org.candlepin.gutterball.jackson.GutterballObjectMapper.readValue()


    @Test
    public void ensurePersistableFromJson() throws Exception {
        String eventJson = loadJsonFile("org/candlepin/gutterball/jackson/compliance-created.json");
        GutterballObjectMapper mapper = new GutterballObjectMapper();
        Event event = mapper.readValue(eventJson, Event.class);
        Compliance complianceSnap = mapper.readValue(event.getNewEntity(), Compliance.class);
        // This is normally done by the event handlers.
        complianceSnap.setDate(complianceSnap.getStatus().getDate());
        complianceSnapshotCurator.create(complianceSnap);
    }
View Full Code Here


    @Test
    public void ensurePersistableFromJson() throws Exception {
        String eventJson = loadJsonFile("org/candlepin/gutterball/jackson/compliance-created.json");
        GutterballObjectMapper mapper = new GutterballObjectMapper();
        Event event = mapper.readValue(eventJson, Event.class);
        Compliance complianceSnap = mapper.readValue(event.getNewEntity(), Compliance.class);
        // This is normally done by the event handlers.
        complianceSnap.setDate(complianceSnap.getStatus().getDate());
        complianceSnapshotCurator.create(complianceSnap);
    }
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.