Exemple #1
0
        public void XmlContainsNoFluff()
        {
            var notice = new TestNotice
            {
                ApiKey  = "123456",
                Version = "2.0"
            };

            var serializer = new CleanXmlSerializer<TestNotice>();
            var xml        = serializer.ToXml(notice);

            Assert.AreEqual(xml, "<notice version=\"2.0\"><api-key>123456</api-key></notice>");
        }
Exemple #2
0
        public void Xml_contains_no_fluff()
        {
            var notice = new TestNotice
            {
                ApiKey = "123456",
                Version = "2.0"
            };

            var serializer = new CleanXmlSerializer<TestNotice>();
            string xml = serializer.ToXml(notice);

            const string expected = @"<notice version=""2.0"">
  <api-key>123456</api-key>
</notice>";
            Assert.AreEqual(expected, xml);
        }
Exemple #3
0
        public void Xml_contains_no_fluff()
        {
            var notice = new TestNotice
            {
                ApiKey  = "123456",
                Version = "2.0"
            };

            var    serializer = new CleanXmlSerializer <TestNotice>();
            string xml        = serializer.ToXml(notice);

            const string expected = @"<notice version=""2.0"">
  <api-key>123456</api-key>
</notice>";

            Assert.AreEqual(expected, xml);
        }