コード例 #1
0
        public void Render_AttributesTest()
        {
            var instance = new OpeningTag
            {
                Name       = "span",
                Attributes = new Dictionary <string, string>()
                {
                    { "id", "0" },
                    { "class", "basic-text" },
                    { "style", "color: red" }
                }
            };

            string renderOutput = instance.Render();

            Assert.AreEqual("<span id=\"0\" class=\"basic-text\" style=\"color: red\">", renderOutput);
        }
コード例 #2
0
        public void Render_Test()
        {
            var instance = new OpeningTag()
            {
                TextAfter = "some stuff"
            };
            var related = new ClosingTag
            {
                Position = 10
            };

            instance.Related = related;

            var renderOuput = instance.Render();

            Assert.AreEqual("<div>some stuff", renderOuput);
        }