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\"")); }
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\"")); }