Skip to content

Commit

Permalink
ReplaceField tests: Added tests with enabled and disable parameters s…
Browse files Browse the repository at this point in the history
…pecified
  • Loading branch information
oscerd committed Aug 29, 2022
1 parent 27a2376 commit 948a09d
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,18 @@ void shouldReplaceFieldWithSpecificDisableFields() throws Exception {
"\"age\":\"29\"" +
"}");
}

@Test
void shouldReplaceFieldWithDisableAllFields() throws Exception {
Exchange exchange = new DefaultExchange(camelContext);

exchange.getMessage().setBody(mapper.readTree(baseJson));

JsonNode node = processor.process("none", "all", "name:firstName", exchange);

Assertions.assertEquals(node.toString(), "{" +
"\"name\":\"Rajesh Koothrappali\"," +
"\"age\":\"29\"" +
"}");
}
}

0 comments on commit 948a09d

Please sign in to comment.