Example #1
0
 public void ComplexSubtractDivide()
 {
     Assert.AreEqual(8, SingleDigitOperandsAddSubMultDiv.Evaluate("8-4-9/3+7"));
 }
Example #2
0
 public void ComplexDivideSubtract()
 {
     Assert.AreEqual(-2, SingleDigitOperandsAddSubMultDiv.Evaluate("8/4/2-9/3"));
 }
Example #3
0
 public void ComplexAddMutiply()
 {
     Assert.AreEqual(23, SingleDigitOperandsAddSubMultDiv.Evaluate("4+3+2*5+6"));
 }
Example #4
0
 public void SimpleDivide()
 {
     Assert.AreEqual(1, SingleDigitOperandsAddSubMultDiv.Evaluate("3/3"));
 }
Example #5
0
 public void ComplexMultiplyAdd()
 {
     Assert.AreEqual(44, SingleDigitOperandsAddSubMultDiv.Evaluate("4*3*2+5*4"));
 }
Example #6
0
 public void SimpleMultiply()
 {
     Assert.AreEqual(12, SingleDigitOperandsAddSubMultDiv.Evaluate("3*4"));
 }
Example #7
0
 public void SimpleSubtract()
 {
     Assert.AreEqual(-1, SingleDigitOperandsAddSubMultDiv.Evaluate("3-4"));
 }
Example #8
0
 public void SimpleAdd()
 {
     Assert.AreEqual(7, SingleDigitOperandsAddSubMultDiv.Evaluate("3+4"));
 }
Example #9
0
 public void EmptyExpression()
 {
     Assert.AreEqual(0, SingleDigitOperandsAddSubMultDiv.Evaluate(string.Empty));
 }
Example #10
0
 public void NullExpression()
 {
     Assert.AreEqual(0, SingleDigitOperandsAddSubMultDiv.Evaluate(null));
 }