public void ReviewControllerDriverIndexReturnsView_ExpectedSuccess() { // Arrange var reviews = GetReviews(); var _mock = new Mock <IReviewLogic>(); _mock.Setup(x => x.GetDriverReviews(It.IsAny <Int32>())).ReturnsAsync(reviews); var controllerUnderTest = new ReviewController(_context, _mock.Object); // Act var result = controllerUnderTest.DriverIndex(1); // Assert Assert.NotNull(result); Assert.Equal(typeof(Task <IActionResult>), result.GetType()); }