Esempio n. 1
0
 public void ItSelectsPrimes()
 {
     //Given
     var numbers = new List<int> { 1, 2, 3, 4, 5 };
     //When
     var filter = new Filter();
     var result = filter.Select(numbers, ThatAre.Prime);
     //Then
     var expected = new List<int> { 2, 3, 5 };
     Assert.AreEqual(expected, result);
 }
Esempio n. 2
0
 public void ItSelectsEvenNumbers()
 {
     //Given
     var numbers = new List<int> {1,2,3,4,5};
     //When
     var filter = new Filter();
     IList<int> result = filter.Select(numbers, ThatAre.Even);
     //Then
     IList<int> expected = new List<int> {2,4};
     Assert.AreEqual(expected, result);
 }