Ejemplo n.º 1
0
 public void RoundupShouldHandleZeroNumDigits()
 {
     var func = new Roundup();
     var args = FunctionsHelper.CreateArgs(999.999, 0);
     var result = func.Execute(args, _parsingContext);
     Assert.AreEqual(1000d, result.Result);
 }
Ejemplo n.º 2
0
 public void RoundupShouldReturnCorrectResultWithPositiveNumber()
 {
     var func = new Roundup();
     var args = FunctionsHelper.CreateArgs(9.9911, 3);
     var result = func.Execute(args, _parsingContext);
     Assert.AreEqual(9.992, result.Result);
 }
Ejemplo n.º 3
0
 public void RoundupShouldHandleNegativeNumDigits()
 {
     var func = new Roundup();
     var args = FunctionsHelper.CreateArgs(99123, -2);
     var result = func.Execute(args, _parsingContext);
     Assert.AreEqual(99200d, result.Result);
 }