use of com.hazelcast.query.impl.getters.JsonPathCursor in project hazelcast by hazelcast.
the class AbstractJsonSchemaTest method validateJsonLiteral.
protected void validateJsonLiteral(JsonValue expectedValue, String originalString, JsonPattern expectedPattern, JsonSchemaNode description, NavigableJsonInputAdapter input, String path) throws IOException {
JsonPathCursor pathArray = splitPath(path);
JsonPattern pattern = JsonSchemaHelper.createPattern(input, description, pathArray);
String failureString = String.format("Path ( %s ) failed on ( %s )", path, originalString);
assertEquals(failureString, expectedPattern, pattern);
pathArray.reset();
input.reset();
JsonValue foundValue = JsonSchemaHelper.findValueWithPattern(input, description, pattern, pathArray);
assertEquals(failureString, expectedValue, foundValue);
}
Aggregations