Esempio n. 1
0
        public void XmlCDATAElementSerializableTest()
        {
            XmlCDATAElementTestModel model = new XmlCDATAElementTestModel()
            {
                Element1 = "<h1>Hello World!</h1>",
                Str      = "this is a string"
            };

            string expectedXml = _xml.FormatXmlString();
            string actualXml   = model.ToXmlString().FormatXmlString();

            Assert.Equal(expectedXml, actualXml);
        }
Esempio n. 2
0
        public void XmlCDATAElementDeserializeTest()
        {
            XmlCDATAElementTestModel model = _xml.ToXmlObject <XmlCDATAElementTestModel>();

            Assert.Equal("<h1>Hello World!</h1>", model.Element1.Value);
        }