public async Task ReadRealFile() { IWordTree tree = await new WordTreeBuilder().BuildFromDictionaryFileAsync( new FileHelper().GetPathToRealDictionaryFile()); Assert.True(tree.IsWord("rubiaceae")); Assert.True(tree.IsWord("katsuwonidae")); Assert.True(tree.IsWord("ritualistically")); Assert.True(tree.IsWord("mac")); }
public async System.Threading.Tasks.Task BasicTest01Async() { string content = @"accolated accolent accoll accolle accolled accollee accombination accommodable"; string tempfile = await new FileHelper().CreateTempFileWithContentAsync(content); IWordTree tree = await new WordTreeBuilder().BuildFromDictionaryFileAsync(tempfile); Assert.True(tree.IsWord("accolated")); Assert.True(tree.IsWord("accolent")); Assert.True(tree.IsWord("accommodable")); Assert.False(tree.IsWord("accommodableK")); }
public WordFinder(IWordTree wordTree) { WordTree = wordTree; MinWordLength = 3; }