Exemplo n.º 1
0
 public void StringCollectionContentTypeCheck()
 {
     wordsDictionary = StringCollect.dictionaryCollect("englishWordsDictionary.txt");
     foreach (object line in wordsDictionary)
     {
         Assert.IsInstanceOfType(line, typeof(string));
     }
 }
Exemplo n.º 2
0
        public void StringCollectionLengthCheck()
        {
            int collectionLength = 370105;

            wordsDictionary = StringCollect.dictionaryCollect("englishWordsDictionary.txt");

            Assert.AreEqual(collectionLength, wordsDictionary.Count);
        }
Exemplo n.º 3
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);
                }
            }
        }