Example #1
0
        public void apply_changes_integrated_tester()
        {
            // I'm starting with a test with 2 comments, removing one comment
            // from the xml, then converting back to the test.  The test should
            // only have one comment afterwards
            var test = new Test("test1", x =>
            {
                x.Add(new Comment("some text"));
                x.Add(new Comment("some other text"));
            });

            string xml = theConverter.ToXml(test);
            var    doc = new XmlDocument();

            doc.LoadXml(xml);
            doc.DocumentElement.RemoveChild(doc.DocumentElement.LastChild);

            theConverter.ApplyXmlChanges(test, doc);

            test.Parts.Count.ShouldEqual(1);
        }