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

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

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

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

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

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

            Assert.Null(encryptedParent);
        }