public void Test_Addition_1() { Logic.Calculator Calc = new Logic.Calculator(); Calc.Number_entered(1); Calc.Addition_entered(); Calc.Number_entered(1); Calc.Addition_entered(); Calc.Equals(); string result = Calc.Equals(); Assert.AreEqual("6", result); }
public void Test_Addition_Calc() { Logic.Calculator calculator = new Logic.Calculator(); calculator.Number_entered(99.5); calculator.Addition_entered(); Assert.AreEqual("99.5", calculator.Equals()); }
public void Test_Example() { Logic.Calculator calculator = new Logic.Calculator(); string result = calculator.Number_entered(51.6); result = calculator.Addition_entered(); Assert.AreEqual("51.6", result); result = calculator.Number_entered(25.1); Assert.AreEqual("25.1", result); Assert.AreEqual("76.7", calculator.Equals()); Assert.AreEqual("76.7", calculator.Equals()); }
public void Multiple_Operators() { Logic.Calculator Calc = new Logic.Calculator(); Calc.Number_entered(1); Calc.Addition_entered(); Calc.Subtraction_entered(); Calc.Number_entered(1); Calc.Equals(); string result = Calc.Equals(); Assert.AreEqual("-1", result); }