public void FailedLoadStateExceptionSerializable() { var exc = new FailedLoadStateException("for testing"); var formatter = new BinaryFormatter(); using (var ms = new MemoryStream()) { formatter.Serialize(ms, exc); ms.Seek(0, SeekOrigin.Begin); var deserialized = (FailedLoadStateException)formatter.Deserialize(ms); Assert.Equal("for testing", deserialized.Message); } }
public void FailedLoadStateExceptionSerializable() { var exc = new FailedLoadStateException("for testing"); AssertException <FailedLoadStateException>(exc); }