public void Cube() { CalcLib.Calculation objc = new CalcLib.Calculation(); int num1 = 20; int num2 = 20; int num3 = 20; int square = num1 * num2 * num3; Assert.IsNotNull(objc.Cube(num1, num2, num3)); }
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)); }
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)); }