public void Write_NestedBinarySerializableClass_CanBeRead()
        {
            var nestedClass = new NestedBinarySerializableClass();
            nestedClass.BinarySerializableClass = new BinarySerializableClass();

            GetWriter().Write(nestedClass);
            var instance = (NestedBinarySerializableClass)GetReader().ReadBinarySerializable();
            Assert.IsInstanceOfType(instance, typeof(NestedBinarySerializableClass));
            Assert.IsInstanceOfType(instance.BinarySerializableClass, typeof(BinarySerializableClass));
        }
Esempio n. 2
0
        public void Write_NestedBinarySerializableClass_CanBeRead()
        {
            var nestedClass = new NestedBinarySerializableClass();

            nestedClass.BinarySerializableClass = new BinarySerializableClass();

            GetWriter().Write(nestedClass);
            var instance = (NestedBinarySerializableClass)GetReader().ReadBinarySerializable();

            Assert.IsInstanceOfType(instance, typeof(NestedBinarySerializableClass));
            Assert.IsInstanceOfType(instance.BinarySerializableClass, typeof(BinarySerializableClass));
        }