@Test void onlyPredicates() { JazonList jazonList = new JazonList((Integer it) -> it > 0, (String s) -> s.matches("re.*")); List<JsonExpectationInput> list = jazonList.list(); assertEquals(2, list.size()); PredicateExpectationInput firstPredicateInput = (PredicateExpectationInput) list.get(0); Predicate<Integer> firstPredicate = firstPredicateInput.predicate(); assertFalse(firstPredicate.test(-10)); assertFalse(firstPredicate.test(-1)); assertFalse(firstPredicate.test(0)); assertTrue(firstPredicate.test(1)); assertTrue(firstPredicate.test(10)); PredicateExpectationInput secondPredicateInput = (PredicateExpectationInput) list.get(1); Predicate<String> secondPredicate = secondPredicateInput.predicate(); assertTrue(secondPredicate.test("red")); assertTrue(secondPredicate.test("reindeer")); assertFalse(secondPredicate.test("black")); assertFalse(secondPredicate.test("octopus")); }
public List<JsonExpectationInput> list() { return list; }
JazonList { public List<JsonExpectationInput> list() { return list; } }
JazonList { public List<JsonExpectationInput> list() { return list; } JazonList(Predicate<?>... predicates);  JazonList(Object... objects); }
JazonList { public List<JsonExpectationInput> list() { return list; } JazonList(Predicate<?>... predicates);  JazonList(Object... objects); JazonList with(Object object); JazonList with(Predicate<T> predicate); List<JsonExpectationInput> list(); }
JazonList { public List<JsonExpectationInput> list() { return list; } JazonList(Predicate<?>... predicates);  JazonList(Object... objects); JazonList with(Object object); JazonList with(Predicate<T> predicate); List<JsonExpectationInput> list();  }