public void Test_Square_Root_Calc() { Logic.Calculator calculator = new Logic.Calculator(); calculator.Number_entered(9.0); calculator.Square_root_entered(); calculator.Number_entered(2.0); Assert.AreEqual("3", calculator.Equals()); }
public void Test_SquareRoot_Negative() { double lhs = -4; Logic.Calculator Calc = new Logic.Calculator(); Calc.Number_entered(lhs); string result = Calc.Square_root_entered(); Assert.AreEqual("Invalid Input", result); }
public void Test_Reciprocal_Zero() { double lhs = 0; Logic.Calculator Calc = new Logic.Calculator(); Calc.Number_entered(lhs); string result = Calc.Square_root_entered(); Assert.AreEqual("Divide by Zero Error", result.ToString()); }