Пример #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);
        }