コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }