public async Task GetOneUrlFromSampleFeed() { int expected = 1; await sut.AddTweet(model); var results = await sut.GetUrlList(); Assert.IsType <List <Url> >(results); Assert.Equal(expected, results.Count); }
public async Task <ActionResult <List <Url> > > GetUrlListFromCollection() { List <Url> list = new List <Url>(); try { var result = await cache.GetUrlList(); if (result == null) { return(NotFound("Null Data")); } else { return(Ok(result.ToList())); } } catch (Exception ex) { return(BadRequest(ex.Message)); } }