Example #1
0
 public void Xml_CData_AddsCDataNode()
 {
     var xml = new Xml();
     xml.Tag("tag", Xml.Fragment(() =>
     {
         xml.CData("content");
         xml.Tag("hello", "world");
     }));
     Assert.Equal("<tag><![CDATA[content]]><hello>world</hello></tag>", xml);
 }
Example #2
0
        public void Xml_CData_AddsCDataNode()
        {
            var xml = new Xml();

            xml.Tag("tag", Xml.Fragment(() =>
            {
                xml.CData("content");
                xml.Tag("hello", "world");
            }));
            Assert.Equal("<tag><![CDATA[content]]><hello>world</hello></tag>", xml);
        }
Example #3
0
 public void Xml_CData_NullData_ThrowsNullException()
 {
     var xml = new Xml();
     Assert.Throws<ArgumentNullException>(() => xml.CData(null));
 }
Example #4
0
        public void Xml_CData_NullData_ThrowsNullException()
        {
            var xml = new Xml();

            Assert.Throws <ArgumentNullException>(() => xml.CData(null));
        }