@Test public void readingAsIteratorHasNextThenNextSequenceWorks() { Iterator<Integer> iterator = $(integerInput).asIterator(); assertTrue(iterator.hasNext()); assertEquals(new Integer(1), iterator.next()); assertTrue(iterator.hasNext()); assertEquals(new Integer(2), iterator.next()); assertTrue(iterator.hasNext()); assertEquals(new Integer(3), iterator.next()); assertFalse(iterator.hasNext()); }
@Test public void noneReturnsFalseIfPredicateMatchesAny() { assertFalse($(integerInput).none(integerGreaterThan1)); }
@Test public void anyReturnsFalseIfEmptyCollection() { assertFalse($(emptyIntegerInput).any(integerGreaterThan1)); }
@Test public void allReturnsFalseIfAnyDoNotMatch() { assertFalse($(integerInput).all(integerGreaterThan1)); }
@Test public void anyReturnsFalseIfPredicateDoesNotMatch() { assertFalse($(integerInput).any(integerGreaterThan100)); }