Esempio n. 1
0
 public void RounddownShouldReturnCorrectResultWithPositiveNumber()
 {
     var func = new Rounddown();
     var args = FunctionsHelper.CreateArgs(9.999, 2);
     var result = func.Execute(args, _parsingContext);
     Assert.AreEqual(9.99, result.Result);
 }
Esempio n. 2
0
 public void RounddownShouldHandleZeroNumDigits()
 {
     var func = new Rounddown();
     var args = FunctionsHelper.CreateArgs(999.999, 0);
     var result = func.Execute(args, _parsingContext);
     Assert.AreEqual(999d, result.Result);
 }
Esempio n. 3
0
 public void RounddownShouldReturn0IfNegativeNumDigitsIsTooLarge()
 {
     var func = new Rounddown();
     var args = FunctionsHelper.CreateArgs(999.999, -4);
     var result = func.Execute(args, _parsingContext);
     Assert.AreEqual(0d, result.Result);
 }
Esempio n. 4
0
 public void RounddownShouldHandleNegativeNumber()
 {
     var func = new Rounddown();
     var args = FunctionsHelper.CreateArgs(-9.999, 2);
     var result = func.Execute(args, _parsingContext);
     Assert.AreEqual(-9.99, result.Result);
 }