Beispiel #1
0
        public void TestSerialization()
        {
            //Expectation
            XmlDocument stepsExpectedXml = new XmlDocument();

            stepsExpectedXml.Load("TestData/Steps.xml");

            //Action
            StepsXmlFactory stepsXmlFactory = new StepsXmlFactory();
            string          xml             = stepsXmlFactory.WriteXml(this.GetTestStepsList());

            XmlDocument stepsActualXml = new XmlDocument();

            stepsActualXml.LoadXml(xml); //load to the XmlDocument to make the same formatting

            //Verify
            Assert.AreEqual(stepsExpectedXml.OuterXml, stepsActualXml.OuterXml, "Unexpected steps serialization result");
        }