public void GetAll_WhenCalled_ReturnsTwoNews() { //Act var news = _sut.GetAllNews(_url); //Assert Assert.Equal(2, news.Count()); }
public IActionResult Get() { try { var news = _feedService.GetAllNews(_url); if (news == null || !news.Any()) { return(NotFound("No news were found from this RSS feeds")); } return(Ok(news)); } catch (Exception ex) { Console.WriteLine(ex); return(NotFound("No news were found from this RSS feeds")); } }