Beispiel #1
0
 public void ClickOnTheClearButton()
 {
     calculator.AddNumber("1");
     calculator.AddOperation("+");
     calculator.AddNumber("9");
     calculator.Counting();
     calculator.Clear();
     Assert.AreEqual("", calculator.CurrentEntry);
     Assert.AreEqual("", calculator.CurrentExpression);
 }
 public void ExpressionWithoutClickEqualSignButtonAndClickClearButtonTest()
 {
     calculator.AddNumber("5");
     calculator.AddComma();
     calculator.AddNumber("2");
     calculator.AddOperation("+");
     calculator.AddNumber("1");
     calculator.AddComma();
     calculator.AddNumber("1");
     calculator.AddOperation("-");
     calculator.AddNumber("3");
     calculator.AddComma();
     calculator.AddNumber("1");
     calculator.AddOperation("+");
     calculator.AddNumber("1");
     calculator.AddComma();
     calculator.AddNumber("9");
     Assert.AreEqual("1,9", calculator.CurrentEntry);
     calculator.Clear();
     Assert.AreEqual("", calculator.CurrentEntry);
     Assert.AreEqual("", calculator.CurrentExpression);
 }
 /// <summary>
 /// Click delete all expression button.
 /// </summary>
 private void buttonDeleteAllExpression_Click(object sender, EventArgs e) => calculator.Clear();