public void DeserializeFromXmlStringTest() { var config1 = new Config1(1, "yur"); var xml = XMLSrializer1.SerializeToXmlString <Config1>(config1); var config2 = XMLSrializer1.DeserializeFromXmlString <Config1>(xml); Assert.AreEqual <Config1>(config1, config2); }
public void SerializeToXmlStringTest() { var config1 = new Config1(1, "yur"); var xml = XMLSrializer1.SerializeToXmlString <Config1>(config1); Console.WriteLine(xml); xml = XMLSrializer1.SerializeToXmlString <Config1>(config1, false); Console.WriteLine(xml); }