public void ValuesReturnedContainsAllValuesWithinRangeThatMatchCriteria() { var iterator = new Iterator(0, 10, i => i % 3 == 0 || i % 5 == 0); Assert.That(iterator.GetValues().Contains(3)); Assert.That(iterator.GetValues().Contains(5)); Assert.That(iterator.GetValues().Contains(6)); Assert.That(iterator.GetValues().Contains(9)); }
public void ValuesReturnedAreAllGreaterThanOrEqualToTheMinimumValue() { var iterator = new Iterator(0, 10, i => i % 3 == 0 || i % 5 == 0); Assert.That(iterator.GetValues().All(i => i >= 0)); }
public void ValuesReturnedAreAllLessThanTheMaximumValue() { var iterator = new Iterator(0, 10, i => i % 3 == 0 || i % 5 == 0); Assert.That(iterator.GetValues().All(i => i < 10)); }
public void IteratorReturnsValues() { var iterator = new Iterator(0, 10, i => i % 3 == 0 || i % 5 == 0); Assert.That(iterator.GetValues().Any()); }