public void NUnit_FilterByPredicate_ZeroFilterOneElementMatch_Test() { FilterByDigit filter = new FilterByDigit(0); int[] expected = new int[] { 220 }; int[] actual = Filters.FilterByPredicate(filter, 220); CollectionAssert.AreEqual(expected, actual, filteredArrayMismatchMsg); }
public void NUnit_FilterByPredicate_FilterIsNegativeOneMatch_Test() { FilterByDigit filter = new FilterByDigit(-1); int[] expected = new int[] { -1 }; int[] actual = Filters.FilterByPredicate(filter, -1, 2); CollectionAssert.AreEqual(expected, actual, filteredArrayMismatchMsg); }
public void NUnit_FilterByPredicate_OnePositiveElementNoMatch_Test() { FilterByDigit filter = new FilterByDigit(1); int[] expected = new int[] { }; int[] actual = Filters.FilterByPredicate(filter, 222); CollectionAssert.AreEqual(expected, actual, filteredArrayMismatchMsg); }
public void NUnit_FilterByPredicate_SetFromTaskExample_Test() { FilterByDigit filter = new FilterByDigit(7); int[] expected = new[] { 7, 7, 70, 17 }; int[] actual = Filters.FilterByPredicate(filter, 7, 1, 2, 3, 4, 5, 6, 7, 68, 69, 70, 15, 17); CollectionAssert.AreEqual(expected, actual, filteredArrayMismatchMsg); }