Ejemplo n.º 1
0
        public void Should_decrypt_the_property_correctly()
        {
            var child = new SubProperty {
                Secret = Create()
            };

            var message = new MessageWithCircularReferences
            {
                Child = child
            };

            child.Self   = child;
            child.Parent = message;

            mutator.MutateIncoming(message);

            Assert.AreEqual(message.Child.Secret.Value, MySecretMessage);
        }
Ejemplo n.º 2
0
        public void Should_encrypt_the_property_correctly()
        {
            var child = new SubProperty {
                Secret = MySecretMessage
            };

            var message = new MessageWithCircularReferences
            {
                Child = child
            };

            child.Self   = child;
            child.Parent = message;

            mutator.MutateOutgoing(message);

            Assert.AreEqual(EncryptedBase64Value, message.Child.Secret.EncryptedValue.EncryptedBase64Value);
        }
Ejemplo n.º 3
0
        public void Should_encrypt_the_property_correctly()
        {
            var child = new SubProperty {Secret = MySecretMessage};

            var message = new MessageWithCircularReferences
                {
                    Child = child
                };
            child.Self = child;
            child.Parent = message;

            mutator.MutateOutgoing(message);

            Assert.AreEqual(EncryptedBase64Value, message.Child.Secret.EncryptedValue.EncryptedBase64Value);
        }
Ejemplo n.º 4
0
        public void Should_decrypt_the_property_correctly()
        {
            var child = new SubProperty {Secret = Create()};

            var message = new MessageWithCircularReferences
                {
                    Child = child
                };
            child.Self = child;
            child.Parent = message;

            mutator.MutateIncoming(message);

            Assert.AreEqual(message.Child.Secret.Value, MySecretMessage);
        }