상속: IMessage
        public void Should_use_the_wireEncrypted_string()
        {
            var message = new Customer
                {
                    Secret = MySecretMessage,
                    SecretField = MySecretMessage,
                    CreditCard = new CreditCardDetails {CreditCardNumber = MySecretMessage},
                    LargeByteArray = new byte[1000000],
                    ListOfCreditCards =
                        new List<CreditCardDetails>
                            {
                                new CreditCardDetails {CreditCardNumber = MySecretMessage},
                                new CreditCardDetails {CreditCardNumber = MySecretMessage}
                            }
                };
            message.ListOfSecrets = new ArrayList(message.ListOfCreditCards);

            mutator.MutateOutgoing(message);

            Assert.AreEqual(EncryptedBase64Value, message.Secret.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, message.SecretField.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, message.CreditCard.CreditCardNumber.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, message.ListOfCreditCards[0].CreditCardNumber.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, message.ListOfCreditCards[1].CreditCardNumber.EncryptedValue.EncryptedBase64Value);

            Assert.AreEqual(EncryptedBase64Value, ((CreditCardDetails)message.ListOfSecrets[0]).CreditCardNumber.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, ((CreditCardDetails)message.ListOfSecrets[1]).CreditCardNumber.EncryptedValue.EncryptedBase64Value);
        }
        public void Should_use_the_wireEncrypted_string()
        {
            var message = new Customer
                {
                    Secret = MySecretMessage,
                    SecretField = MySecretMessage,
                    CreditCard = new CreditCardDetails {CreditCardNumber = MySecretMessage},
                    LargeByteArray = new byte[1000000],
                    ListOfCreditCards =
                        new List<CreditCardDetails>
                            {
                                new CreditCardDetails {CreditCardNumber = MySecretMessage},
                                new CreditCardDetails {CreditCardNumber = MySecretMessage}
                            }
                };
            message.ListOfSecrets = new ArrayList(message.ListOfCreditCards);

            var result = inspector.ScanObject(message).ToList();
            result.ForEach(x => x.Item2.SetValue(x.Item1, Create()));

            Assert.AreEqual(5, result.Count);

            Assert.AreEqual(EncryptedBase64Value, message.Secret.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, message.SecretField.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, message.CreditCard.CreditCardNumber.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, message.ListOfCreditCards[0].CreditCardNumber.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, message.ListOfCreditCards[1].CreditCardNumber.EncryptedValue.EncryptedBase64Value);

            Assert.AreEqual(EncryptedBase64Value, ((CreditCardDetails)message.ListOfSecrets[0]).CreditCardNumber.EncryptedValue.EncryptedBase64Value);
            Assert.AreEqual(EncryptedBase64Value, ((CreditCardDetails)message.ListOfSecrets[1]).CreditCardNumber.EncryptedValue.EncryptedBase64Value);
        }
        public void Should_use_the_wireEncrypted_string()
        {
            var message = new Customer
                {
                    Secret = Create(),
                    SecretField = Create(),
                    CreditCard = new CreditCardDetails {CreditCardNumber = Create()}

                };
            mutator.MutateIncoming(message);

            Assert.AreEqual(MySecretMessage, message.Secret.Value);
            Assert.AreEqual(MySecretMessage, message.SecretField.Value);
            Assert.AreEqual(MySecretMessage, message.CreditCard.CreditCardNumber.Value);
        }
        public void Should_clear_the_compatibility_properties()
        {
            var message = new Customer
                {
                    Secret = MySecretMessage
                };
            mutator.MutateOutgoing(message);

            Assert.AreEqual(message.Secret.EncryptedValue.EncryptedBase64Value, EncryptedBase64Value);
            Assert.AreEqual(message.Secret.EncryptedBase64Value, null);
            Assert.AreEqual(message.Secret.Base64Iv, null);
        }
        public void Should_use_the_wireEncrypted_string()
        {
            var message = new Customer
                {
                    Secret = Create(),
                    SecretField = Create(),
                    CreditCard = new CreditCardDetails {CreditCardNumber = Create()}

            };

            inspector
                .ScanObject(message)
                .ToList()
                .ForEach(x => x.Item2.SetValue(x.Item1, Create()));

            Assert.AreEqual(MySecretMessage, message.Secret.Value);
            Assert.AreEqual(MySecretMessage, message.SecretField.Value);
            Assert.AreEqual(MySecretMessage, message.CreditCard.CreditCardNumber.Value);
        }