public async Task SearchWordTest() { IWordModel model = new WordModel(target); model.AddWord("chocolate"); model.AddWord("salt"); string result = ""; SearchHandler searcher = new SearchHandler(model, (IList <string> s) => { result = s.FirstOrDefault(); return(Task.CompletedTask); }, () => Task.CompletedTask); await searcher.Search(); Assert.Equal("chocolate", result); }