public async Task <List <YoutubeResult> > SearchAsync(string term)
        {
            // encontrar resultados no yt e inserir/atualizar na base
            var ytResults = await _serviceProvider.SearchAsync(term);

            var items = PrepareResults(ytResults);

            await InsertOrUpdateResults(items);

            return(items);
        }
Example #2
0
        public async Task ShouldReturnItemsWhenTermExists()
        {
            var items = await _serviceProvider.SearchAsync("abc");

            Assert.NotEmpty(items);
        }