예제 #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));
 }