Browse Source

Add test

pull/330/head
jochenberger 8 years ago committed by GitHub
parent
commit
7e9cfc90be
  1. 7
      json-path/src/test/java/com/jayway/jsonpath/FilterTest.java

7
json-path/src/test/java/com/jayway/jsonpath/FilterTest.java

@ -89,6 +89,13 @@ public class FilterTest extends BaseTest {
assertThat(filter(where("string-key").eq(null)).apply(createPredicateContext(json))).isEqualTo(false);
}
@Test
public void arr_eq_evals() {
assertThat(filter(where("arr-empty").eq("[]")).apply(createPredicateContext(json))).isEqualTo(true);
assertThat(filter(where("int-arr").eq("[0,1,2,3,4]")).apply(createPredicateContext(json))).isEqualTo(true);
assertThat(filter(where("int-arr").eq("[0,1,2,3]")).apply(createPredicateContext(json))).isEqualTo(false);
assertThat(filter(where("int-arr").eq("[0,1,2,3,4,5]")).apply(createPredicateContext(json))).isEqualTo(false);
}
//----------------------------------------------------------------------------
//
// NE

Loading…
Cancel
Save