public void Should_encrypt_the_value()
        {
            var message = new ConventionBasedSecureMessage
            {
                EncryptedSecret = "encrypted value@init_vector"
            };
            mutator.MutateIncoming(message, null);

            Assert.AreEqual("A secret", message.EncryptedSecret);
        }
        public void Should_encrypt_the_value()
        {
            var message = new ConventionBasedSecureMessage
            {
                EncryptedSecret = "A secret"
            };
            mutator.MutateOutgoing(message, null);

            Assert.AreEqual(string.Format("{0}@{1}", "encrypted value", "init_vector"), message.EncryptedSecret);
        }
Ejemplo n.º 3
0
        public void Should_encrypt_the_value()
        {
            var message = new ConventionBasedSecureMessage
            {
                EncryptedSecret = "A secret"
            };

            mutator.MutateOutgoing(message);

            Assert.AreEqual(string.Format("{0}@{1}", "encrypted value", "init_vector"), message.EncryptedSecret);
        }
Ejemplo n.º 4
0
        public void Should_encrypt_the_value()
        {
            var message = new ConventionBasedSecureMessage
            {
                EncryptedSecret = "encrypted value@init_vector"
            };

            mutator.MutateIncoming(message);

            Assert.AreEqual("A secret", message.EncryptedSecret);
        }
        public void Should_return_the_value()
        {
            var message = new ConventionBasedSecureMessage
            {
                EncryptedSecret = "A secret"
            };

            var result = inspector.ScanObject(message).ToList();

            Assert.AreEqual(1, result.Count);
            Assert.AreEqual("EncryptedSecret", result[0].Item2.Name);
        }
Ejemplo n.º 6
0
        public void Should_return_the_value()
        {
            var message = new ConventionBasedSecureMessage
            {
                EncryptedSecret = "A secret"
            };

            var result = inspector.ScanObject(message).ToList();

            Assert.AreEqual(1, result.Count);
            Assert.AreEqual("EncryptedSecret", result[0].Item2.Name);
        }