Beispiel #1
0
        public void givenMaxStringFirstPositon_whenFindMax_shouldReturnsMaxFirstPosition()
        {
            String[] arr = { "Peach", "Banana", "Apple" };
            GenericMaxValue <string> obj_maxvalue = new GenericMaxValue <string>(arr);
            String actualMax = obj_maxvalue.MaxMethod();

            Assert.AreEqual("Peach", actualMax);
        }
Beispiel #2
0
        public void givenFloatNumThirdPostion_whenFindMax_shouldReturnsMaxThirdPosition()
        {
            double[] arr = { 40.5, 55.5, 20.5 };
            GenericMaxValue <double> obj_maxvalue = new GenericMaxValue <double>(arr);
            double actualMax = obj_maxvalue.MaxMethod();

            Assert.AreEqual(55.5, actualMax);
        }
Beispiel #3
0
        public void givenMaxNumThirdPosition_whenFindMaxNum_shouldReturnsMaxThird()
        {
            int[] arr = { 225, 375, 467 };
            GenericMaxValue <int> obj_maxvalue = new GenericMaxValue <int>(arr);
            int actualMax = obj_maxvalue.MaxMethod();

            Assert.AreEqual(467, actualMax);
        }
Beispiel #4
0
        public void givenMaxNumFirstPosition_whenFindMaxNum_shouldReturnsMaxFirst()
        {
            int[] arr = { 225, 100, 24 };
            GenericMaxValue <int> obj_maxvalue = new GenericMaxValue <int>(arr);
            int actualMax = obj_maxvalue.MaxMethod();

            Assert.AreEqual(225, actualMax);
        }
Beispiel #5
0
        public void givenMoreThreeValue1_whenFindMax_shouldReturnsMaxValue()
        {
            int[] arr = { 112, 344, 432, 555, 678 };
            GenericMaxValue <int> obj_maxvalue = new GenericMaxValue <int>(arr);
            int actualMax = obj_maxvalue.MaxMethod();

            Assert.AreEqual(678, actualMax);
        }
Beispiel #6
0
        public void givenMoreThreeValue_whenFindMax_shouldReturnsMaxValue()
        {
            int[] arr = { 67, 23, 99, 44 };
            GenericMaxValue <int> obj_maxvalue = new GenericMaxValue <int>(arr);
            int actualMax = obj_maxvalue.MaxMethod();

            Assert.AreEqual(99, actualMax);
        }