示例#1
0
        public void CaesarShiftDecryptTest()
        {
            string plainText = "AbCDEFGHIJKLMNOPQRSTUVWXYZ'1";

            string cypherText = CaesarShift.Encrypt(plainText);

            Assert.AreEqual(plainText, CaesarShift.Decrypt(cypherText));
        }
示例#2
0
        public void CaesarShiftEncryptTest()
        {
            string plainText = "AbCDEFGHIJKLMNOPQRSTUVWXYZ'1";

            string cypherText = CaesarShift.Encrypt(plainText);

            Assert.AreEqual("DeFGHIJKLMNOPQRSTUVWXYZABC'4", cypherText);
        }
示例#3
0
        public void CaesarShiftEncryptShiftIsNegativeTest()
        {
            string plainText = "AbCDEFGHIJKLMNOPQRSTUVWXYZ'1";

            string cypherText = CaesarShift.Encrypt(plainText, -1);

            Assert.AreEqual("ZaBCDEFGHIJKLMNOPQRSTUVWXY'0", cypherText);
        }
示例#4
0
        public void CaesarShiftDecryptShiftIs0Test()
        {
            string plainText = "AbCDEFGHIJKLMNOPQRSTUVWXYZ'1";

            CaesarShift.Decrypt(plainText, 0);
        }
示例#5
0
 public void CaesarShiftDecryptDataIsNullTest()
 {
     CaesarShift.Decrypt(null, 5);
 }