Esempio n. 1
0
        public void Encrypt_DataEmpty_ThrowsArgumentNullException()
        {
            var processor = new AesProcessor(_mockCryptoKey);
            var e         = Assert.Throws <ArgumentNullException>(() => processor.Encrypt(string.Empty));

            Assert.That(e.Message, Does.Contain("data"));
        }
Esempio n. 2
0
        public void Encrypt_DataValid_Succeeds()
        {
            var processor      = new AesProcessor(_mockCryptoKey);
            var result         = processor.Encrypt("TestData");
            var resultAsString = string.Join(",", result);

            Assert.That(resultAsString, Is.EqualTo(_validEncryptedString));
        }