public void RideControllerPassengerIndexReturnsView_ExpectedSuccess() { // Arrange var rides = GetRides(); var _mock = new Mock <IRideLogic>(); _mock.Setup(x => x.GetPassengerRides(It.IsAny <Int32>())).ReturnsAsync(rides); var controllerUnderTest = new RideController(_context, _mock.Object); // Act var result = controllerUnderTest.PassengerIndex(1); // Assert Assert.NotNull(result); Assert.Equal(typeof(Task <IActionResult>), result.GetType()); }