public void Filter_GivenIntArray_ShouldReturnArrayOfIntsMeetingGivenCondition() { var m = new MultiplesOf3And5(); var intArray = new int[9] {1, 2, 3, 4, 5, 6, 7, 8, 9}; var expected = new int[4] {1, 2, 3, 4}; var actual = m.Filter(intArray, x => x < 5); CollectionAssert.AreEqual(expected, actual); }
public void Filter_GivenIntArray_ReturnMultiplesOf3Or5() { var m = new MultiplesOf3And5(); var intArray = new int[9] {1, 2, 3, 4, 5, 6, 7, 8, 9}; var expected = new int[4] {3, 5, 6, 9}; var actual = m.Filter(intArray, x => x % 3 == 0 || x % 5 == 0); CollectionAssert.AreEqual(expected, actual); }