コード例 #1
0
        public void Given_Strings_Max_At_Second_Position_Return_Max(string str1, string str2, string str3)
        {
            MaxNumberCheck MaxString = new MaxNumberCheck();
            string         result    = MaxString.MaximumStringNumber(str1, str2, str3);
            string         expected  = str2;

            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public void Given_Float_Max_Number_At_Third_Position_Return_Max(float num1, float num2, float num3)
        {
            MaxNumberCheck MaxFloat = new MaxNumberCheck();
            float          result   = MaxFloat.MaximumFloatNumber(num1, num2, num3);
            float          expected = num3;

            Assert.AreEqual(expected, result);
        }
コード例 #3
0
        public void Given_Int_Max_Number_At_Third_Position_Return_Max(int num1, int num2, int num3)
        {
            MaxNumberCheck MaxInt   = new MaxNumberCheck();
            int            result   = MaxInt.MaximumIntegerNumber(num1, num2, num3);
            int            expected = num3;

            Assert.AreEqual(expected, result);
        }
コード例 #4
0
        public void FindingMaxStringUsingGenerics()
        {
            string maxString = MaxNumberCheck.findMax("Apple", "Peach", "Banana");

            Assert.AreEqual("Peach", maxString);
        }
コード例 #5
0
        public void FindingMaxNumberAtPosition1()
        {
            int maxNumber = MaxNumberCheck.MaximumIntegerNumber(30, 20, 10);

            Assert.AreEqual(30, maxNumber);
        }
コード例 #6
0
        public void FindingMaxFloatNumberUsingGenerics()
        {
            double maxNumber = MaxNumberCheck.findMax(10.0, 20.0, 30.0);

            Assert.AreEqual(30.0, maxNumber);
        }
コード例 #7
0
        public void FindingMaxNumberUsingGenerics()
        {
            int maxNumber = MaxNumberCheck.findMax(10, 20, 30);

            Assert.AreEqual(30, maxNumber);
        }
コード例 #8
0
        public void FindingMaxStringAtPosition3()
        {
            string maxString = MaxNumberCheck.MaximumString("Apple", "Peach", "Banana");

            Assert.AreEqual("Peach", maxString);
        }
コード例 #9
0
        public void FindingMaxFloatNumberAtPosition3()
        {
            double maxNumber = MaxNumberCheck.MaximumFloatNumber(10.0, 20.0, 30.0);

            Assert.AreEqual(30.0, maxNumber);
        }