Esempio n. 1
0
        public IHttpActionResult Get()
        {
            try
            {
                var news = newsContainer.GetLatestNews().ToList();

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

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

            Assert.IsNotEmpty(latestNews);
        }