public IHttpActionResult Get() { try { var news = newsContainer.GetLatestNews().ToList(); return(Ok(news)); } catch (Exception ex) { logger.Error(ex); return(BadRequest()); } }
public void NewsContainer_Should_Return_News() { Assert.IsNotEmpty(container.GetLatestNews().ToList()); }
public void NewsContainer_Should_Get_Latest_News() { var latestNews = newsContainer.GetLatestNews(); Assert.IsNotEmpty(latestNews); }