Example #1
0
        public void ReturnFamousStringWithSomeWord(params string[] w)
        {
            IEnumerable <string> words = from s in w select s;
            string trueResult          = "";

            for (var i = 0; i < w.Length; i++)
            {
                if (i == w.Length - 1)
                {
                    trueResult += w[i]; continue;
                }
                trueResult += w[i] + " ";
            }

            Assert.That(_formatStrings.FormatStringsToFamous(words), Is.EqualTo("{" + trueResult + "}"));
        }
Example #2
0
 public string Correct(string word)
 {
     // Found
     if (_dictionaryLogic.Contains(word))
     {
         return(word);
     }
     // Changed
     if (Corrections(word, out var tmpList))
     {
         return(_formatStrings.FormatStringsToFamous(tmpList));
     }
     //Not Found
     return(_formatStrings.FormatStringToUnknown(word));
 }