Beispiel #1
0
        public void DocHtml5_Parts_Should_be_fine()
        {
            var act = new DocHtml5(
                new Raw("head"),
                new Raw("body")
                ).Parts();

            var expected = new List <IDomPart>()
            {
                new DTHtml5(),
                new TWithContent(
                    new Tag("html"),
                    new PartsGroup(
                        new TWithContent(
                            new Tag("head"),
                            new PartsGroup(
                                new Raw("head")
                                )
                            ),
                        new TWithContent(
                            new Tag("body"),
                            new PartsGroup(
                                new Raw("body")
                                )
                            )
                        )
                    )
            };

            CollectionAssert.AreEqual(expected.Select(e => e.AsString()), act.Select(e => e.AsString()));
        }
Beispiel #2
0
        public void DocHtml5_AsString_Should_be_fine()
        {
            const string expected = "<!DOCTYPE html><html><head>head</head><body>body</body></html>";
            var          act      = new DocHtml5(
                new Raw("head"),
                new Raw("body")
                ).AsString();

            StringAssert.AreEqualIgnoringCase(expected, act);
        }