static void Main(string[] args) { // \n is a newline // \t is a tab space const string HelpMessage = "###Wordscapes Cheater###\n\n" + "Returns matching words based on the characters you provide.\n\n" + "wsc characters\n\n characters The characters that Wordscapes gives you.\n\n" + "Example:\nwsc cat\nact\ncat"; if (ArgsNeedsHelp(args)) { Console.WriteLine(HelpMessage); return; } //We can use the other args for other stuff later //e.g. word count or letter position string characterSet = args[0]; List <string> dictionary = CheatFunctions.GetDictionary(); PrintMatchingWords(CheatFunctions.BuildMatchingWordsArray(characterSet, dictionary)); }
public void BuildMatchingWordsArray_ValidString_Succeed(string input, string stringResult) { string[] expectedResult = stringResult.Split(';').ToArray(); string[] arrayResult = CheatFunctions.BuildMatchingWordsArray(input, CheatFunctions.GetDictionary()); CollectionAssert.AreEquivalent(arrayResult, expectedResult); }