public void TestMethod3() { int[] array = { 1, 1, 6, 1 }; int input = AppearanceCount.CountAppearances(array, 5); Assert.AreEqual(3, input); }
public void TestMethod1() { int[] array = { 1, 7, 6, 1 }; int input = AppearanceCount.CountAppearances(array, 1); Assert.AreEqual(2, input); }
public void TestMethod2() { int[] array = { 7, 6, 6, 6 }; int input = AppearanceCount.CountAppearances(array, 5); Assert.AreEqual(0, input); }
static string TestCountAppearances() { if (AppearanceCount.CountAppearances(new int[] { 3, 2, 2, 5, 1, -8, 7, 2 }, 2) != 3) { return("Failure!"); } return("Success!"); }