Ejemplo n.º 1
0
        public void TestMethod3()
        {
            int[] array = { 1, 1, 6, 1 };
            int   input = AppearanceCount.CountAppearances(array, 5);

            Assert.AreEqual(3, input);
        }
Ejemplo n.º 2
0
        public void TestMethod1()
        {
            int[] array = { 1, 7, 6, 1 };
            int   input = AppearanceCount.CountAppearances(array, 1);

            Assert.AreEqual(2, input);
        }
Ejemplo n.º 3
0
        public void TestMethod2()
        {
            int[] array = { 7, 6, 6, 6 };
            int   input = AppearanceCount.CountAppearances(array, 5);

            Assert.AreEqual(0, input);
        }
Ejemplo n.º 4
0
 static string TestCountAppearances()
 {
     if (AppearanceCount.CountAppearances(new int[] { 3, 2, 2, 5, 1, -8, 7, 2 }, 2) != 3)
     {
         return("Failure!");
     }
     return("Success!");
 }