public async void Task_Delete_ValidData_Return_OkResult() { //Arrange var Id = 2; //Act var result = await _controller.DeleteOrderDetail(Id); //Assert Assert.IsType <OkObjectResult>(result); }
public async Task DeleteOrderDetail_ReturnNoContent() { //Arrange int id = 1; _mockrepo.Setup(repo => repo.OrderDetail.DeleteOrderDetail((OrderDetail)null)); //Act var result = await _controller.DeleteOrderDetail(id); //Assert var badRequest = Assert.IsType <NoContentResult>(result); }