Example #1
0
        public void TestSerializeComplexObjectBad()
        {
            Stranger parent = new Stranger { Name = "Hello", Orphan = new Orphan { Name = "World" } };
            byte[] serialized = ObjectUtil.ConvertToByteArray(parent);

            Assert.Null(serialized);
        }
Example #2
0
        public void TestEncryptNonSerializableObjectInstance()
        {
            Stranger parent = new Stranger {
                Name = "Hello", Orphan = new Orphan {
                    Name = "World"
                }
            };

            byte[] encryptedParent = EncryptionUtil.Encrypt(parent);

            Assert.Null(encryptedParent);
        }
Example #3
0
        public void TestSerializeComplexObjectBad()
        {
            Stranger parent = new Stranger {
                Name = "Hello", Orphan = new Orphan {
                    Name = "World"
                }
            };

            byte[] serialized = ObjectUtil.ConvertToByteArray(parent);

            Assert.Null(serialized);
        }
        public void TestEncryptNonSerializableObjectInstance()
        {
            Stranger parent = new Stranger { Name = "Hello", Orphan = new Orphan { Name = "World" } };
            byte[] encryptedParent = EncryptionUtil.Encrypt(parent);

            Assert.Null(encryptedParent);
        }