Beispiel #1
0
        public void CalcFunctions_Subtract_Two_Numbers()
        {
            int a = 1, b = 2;

            int result = (int)CalcFunctions.Subtract(b, a);

            Assert.AreEqual(result, b - a);
        }
Beispiel #2
0
        public void CalcFunctions_Subtract_Two_Double_Numbers()
        {
            double a = 2.393, b = 4.9393;

            double result = (double)CalcFunctions.Subtract(a, b);

            Assert.AreEqual(result, a - b);
        }
Beispiel #3
0
        public void CalcFunctions_Subtract_Int_And_Double_Numbers()
        {
            double a = 12.392;
            int    b = 5;

            double result = (double)CalcFunctions.Subtract(a, b);

            Assert.AreEqual(result, a - b);
        }
Beispiel #4
0
        public void Check_For_Integer_Underflow_Sub()
        {
            int a = Int32.MinValue;
            int b = 1;

            object result = CalcFunctions.Subtract(a, b);

            Assert.AreEqual(result.ToString(), "UNDERFLOW");
        }