Ejemplo n.º 1
0
        public void AnonymousFunction()
        {
            var formatter = new JsonFunctionAttribute("formatter", "return 'Hello';");
            string actual = formatter.ToString();
            string expected = "formatter: function() { return 'Hello'; }";

            HtmlAssert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void NamedFunction()
        {
            var formatter = new JsonFunctionAttribute("formatter", "showFormat");
            string actual = formatter.ToString();
            string expected = "formatter: showFormat";

            HtmlAssert.AreEqual(expected, actual);
        }