@Test public void allSatisfyOver100() { ArrayList<Integer> list = new ArrayList<Integer>(Interval.oneTo(101)); Assert.assertTrue(ArrayListIterate.allSatisfy(list, Predicates.instanceOf(Integer.class))); Assert.assertFalse(ArrayListIterate.allSatisfy(list, Predicates.greaterThan(2))); }
@Test public void allSatisfy() { ArrayList<Integer> list = this.getIntegerList(); Assert.assertTrue(ArrayListIterate.allSatisfy(list, Predicates.instanceOf(Integer.class))); Assert.assertFalse(ArrayListIterate.allSatisfy(list, Predicates.greaterThan(2))); }