public void Xml_CanSerializeInOneNamespaceAndDeserializeInAnother() { XmlStandardSerializer.SerializeObjectGraph(_infoSaved, "SaveInOneNamespaceLoadInAnother.xml"); var loadInfo = (PokerTell.Infrastructure.Tests.Serialization.OtherNameSpace.InfoToSaveClass) XmlStandardSerializer.DeserializeObjectGraph( "SaveInOneNamespaceLoadInAnother.xml", typeof(PokerTell.Infrastructure.Tests.Serialization.OtherNameSpace.InfoToSaveClass)); Assert.That(loadInfo.ToString(), Is.EqualTo(_infoSaved.ToString())); }
public void Xml_SerializingFromNonExistingFileThrowsFileNotFoundException() { Assert.Throws <FileNotFoundException>( () => XmlStandardSerializer.DeserializeObjectGraph("DoesntExist.xml", typeof(InfoToSaveClass))); }