public void Should_clear_the_compatibility_properties()
        {
            var service = new FakeEncryptionService(new EncryptedValue
            {
                EncryptedBase64Value = EncryptedBase64Value,
                Base64Iv             = "Base64Iv"
            });

            var value = (EncryptedString)MySecretMessage;

            service.EncryptValue(value, null);
            Assert.AreEqual(value.EncryptedValue.EncryptedBase64Value, EncryptedBase64Value);
        }
        public void Should_throw_an_exception()
        {
            var service = new FakeEncryptionService(new EncryptedValue
            {
                EncryptedBase64Value = "EncryptedBase64Value",
                Base64Iv             = "Base64Iv"
            });

            var value = new EncryptedString
            {
                Value = "The real value"
            };

            // ReSharper disable once InvokeAsExtensionMethod
            var exception = Assert.Throws <Exception>(() => EncryptedStringConversions.DecryptValue(service, value, null));

            Assert.AreEqual("Encrypted property is missing encryption data", exception.Message);
        }