Search in sources :

Example 1 with JsonPathAggregator

use of gov.cms.qpp.acceptance.helper.JsonPathAggregator in project qpp-conversion-tool by CMSgov.

the class JsonPathToXpathCoverageTest method testCoverage.

@ParameterizedTest
@MethodSource("paths")
void testCoverage(Path path) throws IOException {
    JsonWrapper metaWrapper = new JsonWrapper(false);
    helper = new JsonPathToXpathHelper(path, metaWrapper, false);
    JsonWrapper wrapper = new JsonWrapper(metaWrapper, true);
    JsonNode root = om.readTree(wrapper.toString());
    JsonPathAggregator agg = new JsonPathAggregator(root);
    agg.getJsonPaths().forEach((key, value) -> helper.executeAttributeTest(key, value));
}
Also used : JsonWrapper(gov.cms.qpp.conversion.encode.JsonWrapper) JsonPathToXpathHelper(gov.cms.qpp.acceptance.helper.JsonPathToXpathHelper) JsonNode(com.fasterxml.jackson.databind.JsonNode) JsonPathAggregator(gov.cms.qpp.acceptance.helper.JsonPathAggregator) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

JsonNode (com.fasterxml.jackson.databind.JsonNode)1 JsonPathAggregator (gov.cms.qpp.acceptance.helper.JsonPathAggregator)1 JsonPathToXpathHelper (gov.cms.qpp.acceptance.helper.JsonPathToXpathHelper)1 JsonWrapper (gov.cms.qpp.conversion.encode.JsonWrapper)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 MethodSource (org.junit.jupiter.params.provider.MethodSource)1