public async Task DeletePart_Success() { //Act var action = await warehouseController.DeletePart(It.IsAny <int>()) as RedirectToActionResult; //Assert warehouseService.Verify(x => x.DeletePart(It.IsAny <int>()), Times.Once); Assert.Equal("Index", action.ActionName); }