Beispiel #1
0
 public void EvaluateCountWorks()
 {
     Evaluate test1 = new Evaluate();
     test1.DoMath("4 + 2");
     test1.DoMath("4 + 4");
     Assert.AreEqual(2, test1.count);
 }
Beispiel #2
0
 public void EvaluateSubtraction()
 {
     Evaluate test1 = new Evaluate();
     int expected = 2;
     Assert.AreEqual(expected, test1.DoMath("4 - 2"));
 }
Beispiel #3
0
 public void EvaluateMultiplication()
 {
     Evaluate test1 = new Evaluate();
     int expected = 8;
     Assert.AreEqual(expected, test1.DoMath("4 * 2"));
 }
Beispiel #4
0
 public void EvaluateModulus()
 {
     Evaluate test1 = new Evaluate();
     int expected = 0;
     Assert.AreEqual(expected, test1.DoMath("4 % 2"));
 }
Beispiel #5
0
 public void EvaluateDivision()
 {
     Evaluate test1 = new Evaluate();
     int expected = 2;
     Assert.AreEqual(expected, test1.DoMath("4 / 2"));
 }
Beispiel #6
0
 public void EvaluateAddition()
 {
     Evaluate test1 = new Evaluate();
     int expected = 6;
     Assert.AreEqual(expected, test1.DoMath("4 + 2"));
 }