Пример #1
0
 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));
 }
Пример #2
0
 public void ValuesReturnedAreAllGreaterThanOrEqualToTheMinimumValue()
 {
     var iterator = new Iterator(0, 10, i => i % 3 == 0 || i % 5 == 0);
     Assert.That(iterator.GetValues().All(i => i >= 0));
 }
Пример #3
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));
 }
Пример #4
0
 public void IteratorReturnsValues()
 {
     var iterator = new Iterator(0, 10, i => i % 3 == 0 || i % 5 == 0);
     Assert.That(iterator.GetValues().Any());
 }