public void PlusWithDecimalPointFromObject(string input, string argument, decimal expectedResult) { var inputA = NumberValue.Create(input); var inputB = new FilterArguments(NumberValue.Create(argument)); var context = new TemplateContext(); var result = NumberFilters.Plus(inputA, inputB, context); Assert.Equal(expectedResult, result.Result.ToNumberValue()); }
public void PlusConvertsObjectToNumber() { var input = new ObjectValue("6"); var arguments = new FilterArguments(3); var context = new TemplateContext(); var result = NumberFilters.Plus(input, arguments, context); Assert.Equal(9, result.ToNumberValue()); }
public void Plus() { var input = NumberValue.Create(6); var arguments = new FilterArguments('3'); var context = new TemplateContext(); var result = NumberFilters.Plus(input, arguments, context); Assert.Equal(9, result.ToNumberValue()); }