public void ItExists() { // Arrange // Act var result = _controller.Index() as ViewResult; // Assert Assert.IsNotNull(result); }
public void ItReturnsCollectionOfHorses() { // Arrange // Act var result = _controller.Index() as ViewResult; // Assert _horseService.Verify(mock => mock.GetAll(), Times.Once); Assert.NotNull(result); Assert.IsAssignableFrom <IEnumerable <HorseSummary> >(result.ViewData.Model); }