public void Delete_ShouldReturnOkResult() { //Arrange var mockService = new Mock <IErrorService>(); mockService.Setup(x => x.Delete(It.IsAny <Error>())); var controller = new ErrorController(mockService.Object, mapper); //Act var contentResult = controller.Delete(1); //Assert Assert.IsType <OkResult>(contentResult); }