Package com.google.appengine.repackaged.org.codehaus.jackson.map

Examples of com.google.appengine.repackaged.org.codehaus.jackson.map.ObjectMapper.readTree()


        return war;
    }

    protected void assertResponse(Map<String, String> expected, String actual) throws Exception {
        ObjectMapper mapper = new ObjectMapper();
        JsonNode root = mapper.readTree(actual);
        for (Map.Entry<String, String> entry : expected.entrySet()) {
            Assert.assertEquals(entry.getValue(), root.get(entry.getKey()).asText());
        }
    }
View Full Code Here


        }
    }

    protected void assertExcluded(Set<String> excluded, String actual) throws Exception {
        ObjectMapper mapper = new ObjectMapper();
        JsonNode root = mapper.readTree(actual);
        for (String name : excluded) {
            Assert.assertNull(root.get(name));
        }
    }
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.