示例#1
0
 public void UT_FormulaError()
 {
     try
     {
         IFormulaParser parser = new NCalcFormulaParser();
         var result = parser.Evaluate("1+N");
     }
     catch
     {
         Assert.IsTrue(true);
     }
 }
示例#2
0
 public void UT_Formula()
 {
     IFormulaParser parser = new NCalcFormulaParser();
     var result = parser.Evaluate("1+2");
     Assert.IsTrue((int)result == 3);
 }