public void TestEncryptToString() { string plainText = "Test string Goes Here"; IEncryption simpleEncryption = new SimpleEncryption(); string encryptedText = simpleEncryption.EncryptToString(plainText); //Make sure that the encryption method is making some transformation to the plain text Assert.AreNotEqual(plainText, encryptedText); }
public void TestDecryptSingleCharStringToString() { IEncryption simpleEncryption = new SimpleEncryption(); string plainText = "a"; string encryptedText = simpleEncryption.EncryptToString(plainText); string decryptedText = simpleEncryption.Decrypt(encryptedText); //Make sure that we are able to get back the same plain text Assert.AreEqual(plainText, decryptedText); }