Пример #1
0
        public void EngineUnloadedException_MessageInner()
        {
            var ie = new Exception();
            var ex = new EngineUnloadedException("foo", ie);

            Assert.AreSame(ie, ex.InnerException);
            Assert.AreEqual("foo", ex.Message);
        }
Пример #2
0
        public void EngineUnloadedException_Inner()
        {
            var ie = new Exception();
            var ex = new EngineUnloadedException(ie);

            Assert.AreSame(ie, ex.InnerException);
            Assert.IsTrue(ex.Message.Contains("unloaded"));
        }
Пример #3
0
        public void EngineUnloadedException_Serialize()
        {
            var bf = new BinaryFormatter();

            var ex = new EngineUnloadedException();

            var ms = new MemoryStream();

            bf.Serialize(ms, ex);

            ms.Position = 0;
            var ef = (EngineUnloadedException)bf.Deserialize(ms);

            Assert.IsTrue(ef.Message.Contains("unloaded"));
        }
Пример #4
0
        public void EngineUnloadedException_Message()
        {
            var ex = new EngineUnloadedException("foo");

            Assert.AreEqual("foo", ex.Message);
        }
Пример #5
0
        public void EngineUnloadedException_Default()
        {
            var ex = new EngineUnloadedException();

            Assert.IsTrue(ex.Message.Contains("unloaded"));
        }