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