public void AllPassedFilterTest() { var check = new int[] { -1, 0, 5, 22, 44, 13451, 23, -43252, 555 }; list = ListMethods.Filter(list, x => x > -50000); AssertAll(list, check); }
public void EvenFilterTest() { var check = new int[] { 0, 22, 44, -43252 }; list = ListMethods.Filter(list, x => x % 2 == 0); AssertAll(list, check); }
public void NegativeFilterTest() { var check = new int[] { -1, -43252 }; list = ListMethods.Filter(list, x => x < 0); AssertAll(list, check); }
public void PositiveFilterTest() { var check = new int[] { 5, 22, 44, 13451, 23, 555 }; list = ListMethods.Filter(list, x => x > 0); AssertAll(list, check); }
public void TwoFilterTest() { var check = new int[] { 0, 22, 44 }; list = ListMethods.Filter(list, x => x % 2 == 0); list = ListMethods.Filter(list, x => x >= 0); AssertAll(list, check); }
public void NonePassedFilterTest() { list = ListMethods.Filter(list, x => x == -50000); Assert.AreEqual(list.Count, 0); }