public void canConsumerClassEncryptWithNullKey() { string key = null; StringCipherConsumer cipher = new StringCipherConsumer(key); string value = "David"; string encryptedString = cipher.Encrypt(value); Assert.AreNotEqual(value, encryptedString); }
public void canConsumerClassDecrypt() { string key = "Allan"; StringCipherConsumer cipher = new StringCipherConsumer(key); string value = "David"; string encryptedString = cipher.Encrypt(value); string decryptedString = cipher.Decrypt(encryptedString); Assert.AreEqual(value, decryptedString); }