Häufig verwendete Methoden
Häufig verwendete Methoden
Häufig verwendete Methoden
Häufig verwendete Methoden
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); }