public void TestEmpty() { var result = new String(); result.Append("<td>"); result.Append("</td>"); _builder = new DateColumnBuilder("", "", null); _builder.Init(); Assert.Equal(result.ToString(), _builder.ToString()); }
public void TestFormat() { var result = new String(); result.Append("<td>"); result.Append("{{ row.a | date:\"b\" }}"); result.Append("</td>"); _builder = new DateColumnBuilder("a", "b", null); _builder.Init(); Assert.Equal(result.ToString(), _builder.ToString()); }
public void TestContent() { var result = new String(); result.Append("<td>"); result.Append("content"); result.Append("</td>"); var content = new DefaultTagHelperContent(); content.AppendHtml("content"); _builder = new DateColumnBuilder("a", "b", content); _builder.Init(); Assert.Equal(result.ToString(), _builder.ToString()); }
/// <summary> /// 测试初始化 /// </summary> public DateColumnBuilderTest() { _builder = new DateColumnBuilder("a", "", null); _builder.Init(); }