예제 #1
0
        public void EncodeUnserializable()
        {
            UnserializableObject pre = new UnserializableObject();

            try
            {
                NetworkManager.Encode(pre);
            }
            catch (Exception e)
            {
                Assert.That(e is SerializationException, "Wrong exception type thrown, was {0}", e.GetType());
                return;
            }

            Assert.Fail("No exception thrown on unserializable obj argument");
        }
예제 #2
0
        public void EncodeUnserializable()
        {
            UnserializableObject pre = new UnserializableObject();

            try
            {
                NetworkManager.Encode(pre);
            }
            catch(Exception e)
            {
                Assert.That(e is SerializationException, "Wrong exception type thrown, was {0}", e.GetType());
                return;
            }

            Assert.Fail("No exception thrown on unserializable obj argument");
        }