public static SearchEngine Get(IEngineData searchEngineData) { var wordSearchBox = new WordSearchBox(searchEngineData.Letters, searchEngineData.Width); var expectedWords = searchEngineData.ExpectedWords; var wordList = new WordList(); wordList.AddWordsToList(expectedWords); return new SearchEngine(wordSearchBox, wordList); }
public static SearchEngine Get(IEngineData searchEngineData) { var wordSearchBox = new WordSearchBox(searchEngineData.Letters, searchEngineData.Width); var expectedWords = searchEngineData.ExpectedWords; var wordList = new WordList(); wordList.AddWordsToList(expectedWords); return(new SearchEngine(wordSearchBox, wordList)); }
public void TestWhenWordsAddedTheMiddleWordIsFound() { // arrange var newWords = new List<string> { "firstword", "middleword", "lastword" }; var wordList = new WordList(); // act wordList.AddWordsToList(newWords); // assert Assert.IsTrue(wordList.IsInWordList("middleword")); }
public void TestWhenWordsAddedTheFirstWordIsFound() { // arrange var newWords = new List <string> { "firstword", "middleword", "lastword" }; var wordList = new WordList(); // act wordList.AddWordsToList(newWords); // assert Assert.IsTrue(wordList.IsInWordList("firstword")); }