public void SubtypesOnUnknownTypeFieldShouldThrowBindingException()
        {
            var unknownTypeClass = new InvalidUnknownTypeClass { Field = "hello" };

            var serializer = new BinarySerialization.BinarySerializer();

            var stream = new MemoryStream();
            serializer.Serialize(stream, unknownTypeClass);
        }
Exemple #2
0
        public void SubtypesOnUnknownTypeFieldShouldThrowBindingException()
        {
            var unknownTypeClass = new InvalidUnknownTypeClass {
                Field = "hello"
            };

            var serializer = new BinarySerializer();

            var stream = new MemoryStream();

            Assert.Throws <BindingException>(() => serializer.Serialize(stream, unknownTypeClass));
        }