Exemplo n.º 1
0
        public void Test_DivElement_Render()
        {
            Div t = new Div();

            t.Id("myDiv");
            t.IsRowFluid(true);
            t.Size(GridUtils.FormatGrid(extraSmallSize: 12, largeSize: 12));
            t.AddCss("testClass");

            string render = t.Render();

            Assert.IsTrue(render.Contains("id=\"myDiv\""), "Dv not contains id declaration");
            Assert.IsTrue(render.Contains("class") &&
                render.Contains("row"), "Div not contains class=\"row ...\" declaration");
            Assert.IsTrue(render.Contains("class") && render.Contains("col-xs-12 col-lg-12"),
                "Div doesn't have grid responsive values");
            Assert.IsTrue(render.Contains("class") &&
                render.Contains("testClass"), "Div not contains class=\"testClass ...\" declaration");
            Assert.AreEqual("<div class=\"testClass row col-xs-12 col-lg-12\" id=\"myDiv\"></div>", render,
                "Div don't have same values from test");
        }