public void ModuloWithNoArgumentThrows() { var input = NumberValue.Create(6); var arguments = FilterArguments.Empty; var context = new TemplateContext(); Assert.Throws <ParseException>(() => NumberFilters.Modulo(input, arguments, context)); }
public void Modulo() { var input = NumberValue.Create(6); var arguments = new FilterArguments(4); var context = new TemplateContext(); var result = NumberFilters.Modulo(input, arguments, context); Assert.Equal(2, result.ToNumberValue()); }