Exemple #1
0
        public void checkStringCompare()
        {
            wordsDictionary = StringCollect.dictionaryCollect("englishWordsDictionary.txt");
            var ecryptedString = Ecrypt.EncryptStringLine(stringToCheck, ecryptKey);

            for (int key = 1; key < 27; key++)
            {
                string decryptedMessage = Ecrypt.DecryptStringLine(ecryptedString, key);
                decryptedMessage = decryptedMessage.ToLower();
                if (StringCompare.CompareStrings(decryptedMessage, wordsDictionary))
                {
                    Assert.AreEqual(decryptedMessage, stringToCheck);
                }
            }
        }