コード例 #1
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));
        }
コード例 #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));
        }