public void EncryptDecrypt_DefaultKey() { MickeyMouseEncryption enc = new MickeyMouseEncryption(); string plaintext = "Missing is freaking awesome!"; string ciphertext = enc.Encrypt(plaintext); Assert.AreEqual(plaintext, enc.Decrypt(ciphertext), "Decrypted string does not match plaintext"); }
public void EncryptDecrypt_CustomKey() { MickeyMouseEncryption enc = new MickeyMouseEncryption(); string key = "DanceALittleDanceAndPeeYourNameInTheSnow"; string plaintext = "Missing is freaking awesome!"; string ciphertext = enc.Encrypt(plaintext, key); Assert.AreEqual(plaintext, enc.Decrypt(ciphertext, key), "Decrypted string does not match plaintext"); }