public void MSTest_FilterDigit_If_Input_Array_Length_Is_0() { int[] inputArray = new int[0]; var filter = 6; var filterPredicate = new FilterAndChange.FilterArrayIntegerNumbers(filter); foreach (int item in inputArray.FilterDigit(filterPredicate)) { Assert.IsTrue(FilterAndChange.IsNumberFilterHelper(item, filterPredicate)); } }
public void MSTest_FilterDigit_Expected_ArgumentNullException() { int[] inputArray = null; var filter = 6; var filterPredicate = new FilterAndChange.FilterArrayIntegerNumbers(filter); foreach (int item in inputArray.FilterDigit(filterPredicate)) { Assert.IsTrue(FilterAndChange.IsNumberFilterHelper(item, filterPredicate)); } }
public void NUnitTest_FilterDigit_With_Valid_Data() { var arrayForTest = new int[1000000]; Random random = new Random(0); for (int itemArray = 0; itemArray < arrayForTest.Length; itemArray++) { arrayForTest[itemArray] = random.Next(0, 100000); } var filter = 6; var filterPredicate = new FilterAndChange.FilterArrayIntegerNumbers(filter); foreach (int item in arrayForTest.FilterDigit(filterPredicate)) { Assert.IsTrue(FilterAndChange.IsNumberFilterHelper(item, filterPredicate)); } }