Exemplo n.º 1
0
        internal void Render_Table_Indent()
        {
            // Arrange
            var renderer = new PageRenderer();

            renderer.AppendTable(
                PageContentRowFormattingStyle.Indent,
                ("column 1", "column 2"),
                ("value 1", "value 2")
                );

            // Act
            var contentText = renderer.ToString();

            // Assert
            var lines = contentText.ToLines();

            Assert.Equal(2, lines.Length);

            Assert.Equal("  column 1  column 2", lines[0]);
            Assert.Equal("  value 1   value 2", lines[1]);
        }
Exemplo n.º 2
0
        internal void Render_Multiple_Six_Columns_Table()
        {
            // Arrange
            var renderer = new PageRenderer();

            renderer.AppendTable(
                PageContentRowFormattingStyle.None,
                ("column 1", "column 2", "column 3", "column 4", "column 5", "column 6"),
                ("value 1", "value 2", "value 3", "value 4", "value 5", "value 6")
                );

            // Act
            var contentText = renderer.ToString();

            // Assert
            var lines = contentText.ToLines();

            Assert.Equal(2, lines.Length);

            Assert.Equal("column 1  column 2  column 3  column 4  column 5  column 6", lines[0]);
            Assert.Equal("value 1   value 2   value 3   value 4   value 5   value 6", lines[1]);
        }