public void VehicleControllerDeleteConfirmedReturnsView_ExpectedSuccess() { // Arrange Mock <IVehicleLogic> mockVehicleLogic = new Mock <IVehicleLogic>(); mockVehicleLogic.Setup(x => x.GetSingleVehicle(It.IsAny <Int32>())).ReturnsAsync(GetVehicle()); var controllerUnderTest = new VehicleController(_context, mockVehicleLogic.Object); // Act var result = controllerUnderTest.DeleteConfirmed(1); // Assert var viewResult = Assert.IsType <Task <IActionResult> >(result); }