public void Testcount5or6() { int[] Arr1 = new int[] { 1, 2, 3, 4, 5, 6 }; int result1 = Program2.count5or6(Arr1); Assert.AreEqual(2, result1); int[] Arr2 = new int[] { 1, 2, 3, 4, 7 }; int result2 = Program2.count5or6(Arr2); Assert.AreEqual(0, result2); }
public void TestCount5or6() { int[] arr1 = new int[] { 1, 2, 3, 4, 5 }; int rs1 = Program2.count5or6(arr1); Assert.AreEqual(1, rs1); int[] arr2 = new int[] { 1, 2, 3, 4 }; int rs2 = Program2.count5or6(arr2); Assert.AreEqual(0, rs2); int[] arr3 = new int[] { 1, 2, 5, 6, 5 }; int rs3 = Program2.count5or6(arr3); Assert.AreEqual(3, rs3); }