java-hamcrest icon indicating copy to clipboard operation
java-hamcrest copied to clipboard

Impossible to use hasItem with jsonArray

Open nikita2206 opened this issue 6 years ago • 0 comments

I know it's been mentioned in #25 but it still seems impossible to use hasItem and hasItems with jsonArray:

assertThat((JsonNode)null, jsonArray(hasItem(jsonText("as"))));
assertThat((JsonNode)null, jsonArray(hasItems(jsonText("as"), jsonText("qw"))));
assertThat((JsonNode)null, jsonObject().where("key", jsonArray(hasItems(jsonText("as"), jsonText("qw")))));

None of these will build

nikita2206 avatar Nov 29 '19 14:11 nikita2206