Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
public void GetHeadlineNews_ShouldReturnListOfNews() { var mockINewsService = new Mock <INewsService>(); mockINewsService.Setup(service => service.GetHeadLines()).Returns(GetasyncNews()); var newsController = new NewsController(mockINewsService.Object); // Act var result = newsController.GetHeadLines().Result as List <News>; //Assert Assert.Equal(4, result.Count); Assert.NotNull(result); }