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

            int num1   = 20;
            int num2   = 20;
            int Number = num1 * num2;

            Squareroot = Math.Sqrt(Number);
            Assert.IsNotNull(objc.SquareRoot(SquareRoot));
        }
Esempio n. 2
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));
        }