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