Ejemplo n.º 1
0
        public async Task Module_adds_specified_optional_classes(BootstrapTableOptions tableOptions, string expectedClass)
        {
            // ARRANGE
            var document = new TestDocument(@"<html>
                        <head>
                            <title>Irrelevant</title>
                        </head>
                        <body>
                            <table>
                            </table>
                        </body>
                    </html>");

            var sut = new UseBootstrapTables().WithTableOptions(tableOptions);

            // ACT
            var result = await ExecuteAsync(document, sut).SingleAsync();

            // ASSERT
            var html = await result.ParseAsHtmlAsync();

            html.QuerySelectorAll("table")
            .Should().ContainSingle()
            .Which.Should().BeAssignableTo <IHtmlTableElement>()
            .Which.ClassList
            .Should().HaveCount(2)
            .And.Contain(new[] { "table", expectedClass });
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Set <see cref="BootstrapTableOptions"/> to use for processing tables
 /// </summary>
 public UseBootstrapTables WithTableOptions(BootstrapTableOptions tableOptions)
 {
     m_TableOptions = tableOptions;
     return(this);
 }