public void WhenTheXMLStringWithTheDifferentXMLRootAttributeIsDeserialisedWithAnOverrideOfTheXMLRootAttribute() { var newXmlRoot = CreateNewXmlRootAttribute(); this.testXmlObject = this.expectedXml.DeserialiseFromXml <TestObjectForXmlStuff>(newXmlRoot); this.actualXml = this.testXmlObject.SerialiseToXml(newXmlRoot); Logger.Log($"Actual re-serialised XML: {Environment.NewLine}" + this.actualXml); }
private void CreateTestXmlObject() { this.testXmlObject = new TestObjectForXmlStuff { MyIntProperty = 12, MyStringProperty = "Dummy data", MyStringPropertyWithDifferentNamespace = "Dummy data 2" }; }
public void WhenTheXMLStringWithTheDefaultXMLRootAttributeIsDeserialisedWithNoSerialisationOverrides() { this.testXmlObject = this.expectedXml.DeserialiseFromXml <TestObjectForXmlStuff>(); this.actualXml = this.testXmlObject.SerialiseToXml(); Logger.Log($"Actual re-serialised XML: {Environment.NewLine}" + this.actualXml); }