Esempio n. 1
0
        public void Square()
        {
            CalcLib.Calculation objc = new CalcLib.Calculation();

            int num1   = 20;
            int num2   = 20;
            int square = num1 * num2;

            Assert.IsNotNull(objc.Square(num1, num2));
        }
Esempio n. 2
0
        public void TestMethod1()
        {
            CalcLib.Calculation objc = new CalcLib.Calculation();
            double num    = 16;
            double square = num * num;
            double sqrt   = Math.Sqrt(num);
            double cube   = num * num * num;

            Assert.AreEqual(square, objc.Square(num));
            Assert.AreEqual(sqrt, objc.Sqrt(num));
            Assert.AreEqual(cube, objc.Cube(num));
        }
Esempio n. 3
0
        public void TestMethod1()
        {
            CalcLib.Calculation objc = new CalcLib.Calculation();
            double num1          = 64;
            double squareRes     = num1 * num1;
            double squarerootRes = Math.Sqrt(num1);
            double cubeRes       = num1 * num1 * num1;

            Assert.AreEqual(squareRes, objc.Square(num1));
            Assert.AreEqual(squarerootRes, objc.SquareRoot(num1));
            Assert.AreEqual(cubeRes, objc.Cube(num1));
        }