Adding an option to validate children nodes in an array (#219)
without this change it's impossible to assert with response matchers all elements of an array with this change we're using AssertJs conditions in case the pattern contains [*] fixes #217
This commit is contained in:
committed by
GitHub
parent
8449382110
commit
ab7fe13aac
@@ -342,7 +342,7 @@ assertions and the one from matchers with an `and` section):
|
||||
assertThat((Object) parsedJson.read("$.valueWithMax")).isInstanceOf(java.util.List.class);
|
||||
assertThat(parsedJson.read("$.valueWithMax", java.util.Collection.class).size()).isLessThanOrEqualTo(3);
|
||||
assertThat((Object) parsedJson.read("$.valueWithMinMax")).isInstanceOf(java.util.List.class);
|
||||
assertThat(parsedJson.read("$.valueWithMinMax", java.util.Collection.class).size()).isStrictlyBetween(1, 3);
|
||||
assertThat(parsedJson.read("$.valueWithMinMax", java.util.Collection.class).size()).isBetween(1, 3);
|
||||
----
|
||||
|
||||
and the WireMock stub like this:
|
||||
|
||||
Reference in New Issue
Block a user