public void CaesarCryptIsSuccessful() { const string THE_QBF = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"; const string THE_QBF_SHIFT23 = "QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD"; string cipherText, plainText; cipherText = Caesar.EncryptASCII("ABC", 1); Assert.AreEqual("BCD", cipherText, "ABC not encrypted correctly"); cipherText = Caesar.EncryptASCII("abc", 1); Assert.AreEqual("bcd", cipherText, "abc not encrypted correctly"); cipherText = Caesar.EncryptASCII("XYZ", 1); Assert.AreEqual("YZA", cipherText, "XYZ not encrypted correctly"); cipherText = Caesar.EncryptASCII("xyz", 1); Assert.AreEqual("yza", cipherText, "xyz not encrypted correctly"); cipherText = Caesar.EncryptASCII(THE_QBF, 23); Assert.AreEqual(THE_QBF_SHIFT23, cipherText, "THE QUICK BROWN FOX FAILED AND FLOPPED."); plainText = Caesar.DecryptASCII("BCD", 1); Assert.AreEqual("ABC", plainText, "BCD not decrypted correctly"); plainText = Caesar.DecryptASCII("bcd", 1); Assert.AreEqual("abc", plainText, "bcd not decrypted correctly"); plainText = Caesar.DecryptASCII(THE_QBF_SHIFT23, 23); Assert.AreEqual(THE_QBF, plainText, "Fail: QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD"); }