public void AnonymousFunction() { var formatter = new JsonFunctionAttribute("formatter", "return 'Hello';"); string actual = formatter.ToString(); string expected = "formatter: function() { return 'Hello'; }"; HtmlAssert.AreEqual(expected, actual); }
public void NamedFunction() { var formatter = new JsonFunctionAttribute("formatter", "showFormat"); string actual = formatter.ToString(); string expected = "formatter: showFormat"; HtmlAssert.AreEqual(expected, actual); }