コード例 #1
0
        public void The_Write_Method_Creates_The_Correct_XML()
        {
            ProjectSerialiserV1 serialiser = new ProjectSerialiserV1(fileController);

            StringBuilder sb = new StringBuilder();
            XmlWriter writer = XmlWriter.Create(sb, new XmlWriterSettings { OmitXmlDeclaration = true });
            serialiser.WriteUserOptionDetailsXML(new[]{userOption}, writer);
            writer.Close();

            string output = XmlSqueezer.RemoveWhitespaceBetweenElements(sb.ToString());
            Assert.That(output, Is.EqualTo(ExpectedXml));
        }
        public void The_Write_Method_Creates_The_Correct_XML()
        {
            ProjectSerialiserV1 serialiser = new ProjectSerialiserV1(fileController);

            StringBuilder sb     = new StringBuilder();
            XmlWriter     writer = XmlWriter.Create(sb, new XmlWriterSettings {
                OmitXmlDeclaration = true
            });

            serialiser.WriteUserOptionDetailsXML(new[] { userOption }, writer);
            writer.Close();

            string output = XmlSqueezer.RemoveWhitespaceBetweenElements(sb.ToString());

            Assert.That(output, Is.EqualTo(ExpectedXml));
        }