예제 #1
0
        public IHttpActionResult Get()
        {
            try
            {
                var news = newsContainer.GetLatestNews().ToList();

                return(Ok(news));
            }
            catch (Exception ex)
            {
                logger.Error(ex);

                return(BadRequest());
            }
        }
예제 #2
0
 public void NewsContainer_Should_Return_News()
 {
     Assert.IsNotEmpty(container.GetLatestNews().ToList());
 }
예제 #3
0
        public void NewsContainer_Should_Get_Latest_News()
        {
            var latestNews = newsContainer.GetLatestNews();

            Assert.IsNotEmpty(latestNews);
        }