Пример #1
0
 public void TestGridHeaderRenderer()
 {
     var renderer = new GridHeaderRenderer();
     var column = new GridColumn<TestModel, string>(c => c.Title, null);
     var htmlstring = renderer.Render(column);
     Assert.IsNotNull(htmlstring);
     var html = htmlstring.ToHtmlString();
     Assert.IsTrue(!string.IsNullOrWhiteSpace(html));
     Assert.IsTrue(html.Contains("<th"));
     Assert.IsTrue(html.Contains("class=\"grid-header\""));
 }
        public void TestGridHeaderRenderer()
        {
            var renderer   = new GridHeaderRenderer();
            var column     = new GridColumn <TestModel, string>(c => c.Title, null);
            var htmlstring = renderer.Render(column);

            Assert.IsNotNull(htmlstring);
            var html = htmlstring.ToHtmlString();

            Assert.IsTrue(!string.IsNullOrWhiteSpace(html));
            Assert.IsTrue(html.Contains("<th"));
            Assert.IsTrue(html.Contains("class=\"grid-header\""));
        }
Пример #3
0
        public void TestGridHeaderRenderer()
        {
            var renderer   = new GridHeaderRenderer();
            var column     = new GridColumn <TestModel, string>(c => c.Title, null);
            var htmlstring = renderer.Render(column);

            Assert.IsNotNull(htmlstring);
            string html;

            using (var sw = new StringWriter())
            {
                htmlstring.WriteTo(sw, HtmlEncoder.Default);
                html = sw.ToString();
            };
            Assert.IsTrue(!string.IsNullOrWhiteSpace(html));
            Assert.IsTrue(html.Contains("<th"));
            Assert.IsTrue(html.Contains("class=\"grid-header\""));
        }