Example #1
0
        public void MultilpyDecimalAndNegative()
        {
            SimpleCalc simpleCalc = new SimpleCalc();
            double     a          = 0.120;
            double     b          = -2.0;

            double ans    = a * b;
            double result = simpleCalc.mulitplyNumbers(a, b);

            Assert.AreEqual(result, ans);
        }
Example #2
0
        public void MultilpyWholeNumberAndDecimal()
        {
            SimpleCalc simpleCalc = new SimpleCalc();
            double     a          = 12.0;
            double     b          = 0.1230;

            double ans    = a * b;
            double result = simpleCalc.mulitplyNumbers(a, b);

            Assert.AreEqual(result, ans);
        }
Example #3
0
        public void MultilpyTwoDecimals()
        {
            SimpleCalc simpleCalc = new SimpleCalc();
            double     a          = 0.123342130;
            double     b          = 0.123342130;

            double ans    = a * b;
            double result = simpleCalc.mulitplyNumbers(a, b);

            Assert.AreEqual(result, ans);
        }
Example #4
0
        public void MultilpyTwoLargeNumbers()
        {
            SimpleCalc simpleCalc = new SimpleCalc();
            double     a          = 1973820.0;
            double     b          = 1256890.0;

            double ans    = a * b;
            double result = simpleCalc.mulitplyNumbers(a, b);

            Assert.AreEqual(result, ans);
        }
Example #5
0
        public void MultilpyOneZeroOneNegative()
        {
            SimpleCalc simpleCalc = new SimpleCalc();
            double     a          = 0.0;
            double     b          = -10.0;

            double ans    = a * b;
            double result = simpleCalc.mulitplyNumbers(a, b);

            Assert.AreEqual(result, ans);
        }
Example #6
0
        public void MultilpyTwoPositives()
        {
            SimpleCalc simpleCalc = new SimpleCalc();
            double     a          = 10.0;
            double     b          = 10.0;

            double ans    = a * b;
            double result = simpleCalc.mulitplyNumbers(a, b);

            Assert.AreEqual(result, ans);
        }