use of io.cucumber.messages.internal.com.fasterxml.jackson.core.JsonProcessingException in project cucumber-jvm by cucumber.
the class CompatibilityTest method readAllMessages.
private static List<JsonNode> readAllMessages(Path output) throws IOException {
List<JsonNode> expectedEnvelopes = new ArrayList<>();
ObjectMapper mapper = new ObjectMapper().enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING).configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
Files.readAllLines(output).forEach(s -> {
try {
expectedEnvelopes.add(mapper.readTree(s));
} catch (JsonProcessingException e) {
throw new RuntimeException(e);
}
});
return expectedEnvelopes;
}
Aggregations