public void BinarySerializable_BasicRoundTrip() { SampleSerializable sample = new SampleSerializable(12345); sample.Write("Sample"); SampleSerializable sampleRead = new SampleSerializable(0); Assert.IsTrue(sampleRead.TryRead("Sample")); Assert.AreEqual(4, BinarySerializable.Size("Sample")); Assert.AreEqual(sample.Value, sampleRead.Value); }
public void BinarySerializable_FileMissing() { SampleSerializable sample = new SampleSerializable(0); Assert.IsFalse(sample.TryRead("FileNotFound")); }