Пример #1
0
        public void TestThatEncryptValueAndDecryptValueOnConfigurationRepositoryEncryptsAndDescryptsValue()
        {
            var fixture  = new Fixture();
            var password = fixture.Create <string>();

            var encryptedPassword = ConfigurationRepository.EncryptValue(password);

            Assert.That(encryptedPassword, Is.Not.Null);
            Assert.That(encryptedPassword, Is.Not.Empty);

            var decryptedPassword = ConfigurationRepository.DecryptValue(encryptedPassword);

            Assert.That(decryptedPassword, Is.Not.Null);
            Assert.That(decryptedPassword, Is.Not.Empty);
            Assert.That(decryptedPassword, Is.EqualTo(password));
        }