コード例 #1
0
        public void TestProblem_04_03()
        {
            int[] myArray = { 2, 2, 3, 2, 5, 6, 7, 2, 9, 2 };
            int   result  = CountOfNumberInArray.CountOfGivenNumberInArray(2, myArray);

            Assert.AreEqual(5, result);
        }
コード例 #2
0
        public void TestProblem_04_05()
        {
            int[] myArray = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            int   result  = CountOfNumberInArray.CountOfGivenNumberInArray(89, myArray);

            Assert.AreEqual(0, result);
        }
コード例 #3
0
        public void TestProblem_04_02()
        {
            int[] myArray = { 1, 2, 3, 1, 5, 6, 7, 1, 9, 10 };
            int   result  = CountOfNumberInArray.CountOfGivenNumberInArray(1, myArray);

            Assert.AreEqual(3, result);
        }