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.WriteUserOptionXML(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.WriteUserOptionXML(userOption, writer); writer.Close(); string output = XmlSqueezer.RemoveWhitespaceBetweenElements(sb.ToString()); Assert.That(output, Is.EqualTo(expectedXml)); }