Skip to content

Commit

Permalink
explicitly compare Trace field
Browse files Browse the repository at this point in the history
Signed-off-by: Sally MacFarlane <[email protected]>
  • Loading branch information
macfarla committed Apr 27, 2023
1 parent 7132d95 commit c8698eb
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,16 @@ private void traceOperation(final URL specFile) throws IOException {
final JsonNode expectedTrace = specNode.get("output");
final JsonNode actualTrace = generateTrace(getModuleTracer().jsonKey(), request);

assertThat(MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(actualTrace.get(0)))
assertThat(
MAPPER
.writerWithDefaultPrettyPrinter()
.writeValueAsString(
MAPPER.readTree(String.valueOf(actualTrace)).findValue("Trace")))
.isEqualTo(
MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(expectedTrace.get(0)));
MAPPER
.writerWithDefaultPrettyPrinter()
.writeValueAsString(
MAPPER.readTree(String.valueOf(expectedTrace)).findValue("Trace")));
}

private JsonNode generateTrace(String moduleName, JsonNode jsonNodeParams)
Expand Down

0 comments on commit c8698eb

Please sign in to comment.