private void _TestSerialization ( FileSpecification first ) { byte[] bytes = first.SaveToMemory(); FileSpecification second = bytes.RestoreObjectFromMemory <FileSpecification>(); Assert.AreEqual(first.Database, second.Database); Assert.AreEqual(first.BinaryFile, second.BinaryFile); Assert.AreEqual(first.Content, second.Content); Assert.AreEqual(first.FileName, second.FileName); Assert.AreEqual(first.Path, second.Path); }