Ejemplo n.º 1
0
        // Test to ensure encryption works for x, y and z.
        public static string testEncryptEndOfAlphabet()
        {
            encryption.encryptWord alphabetTest = new encryptWord();
            string testWord = "xxyyzz";

            // Returned string will be "aabbcc"
            return(alphabetTest.Encrypt(testWord));
        }
Ejemplo n.º 2
0
        // Test to ensure strings of length 0 are rejected from encrypting
        public static string testZeroCharInputWord()
        {
            encryption.encryptWord wordLength = new encryptWord();

            return(wordLength.Encrypt(""));
        }
Ejemplo n.º 3
0
        // Test to ensure strings less than 4 characters are rejected from
        // encrypting
        public static string testLessThan4CharInputWord()
        {
            encryption.encryptWord wordLength = new encryptWord();

            return(wordLength.Encrypt("abc"));
        }