Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
        public void FailedLoadStateExceptionSerializable()
        {
            var exc = new FailedLoadStateException("for testing");

            AssertException <FailedLoadStateException>(exc);
        }