Пример #1
0
        public void TableElement_ShouldBeCreatedProperly()
        {
            TableElement element = new TableElement();

            element.AddColumns(new TextContent("column1"), new TextContent("column2"));
            element.AddRow(new TextContent("text1"), new TextContent("text2"));

            element.ToString().Should()
            .BeEquivalentTo(
                "<table><thead><th>column1</th><th>column2</th></thead><tbody><tr><td>text1</td><td>text2</td></tr></tbody></table>");
        }