public async Task Search_EmptySearchEngineMessage_TwoEngines() { var engine = EmptySearchEngine(); var service = new WebSearchService( new List <ISearchEngine> { engine, DelaySearchEngine(3000) }); var model = await service.Search("query"); Assert.Equal(count, model.Items.Count()); Assert.Contains(WebSearchService.NotFoundMessage(engine.Name), model.Message); }
public async Task Search_EmptySearchEngineMessage_OneEngine() { var engine = EmptySearchEngine(); var service = new WebSearchService( new List <ISearchEngine> { engine }); var model = await service.Search("query"); Assert.Null(model.Items); Assert.Contains(WebSearchService.NotFoundMessage(engine.Name), model.Message); }