public void DeleteUserReturnsOkAndDeleteUser() { // Arrange int reportId = 1; var serviceMoq = new Mock <IReportService>(); serviceMoq.Setup(repo => repo.DeleteReport(reportId)).Returns(new ServiceResultDTO(true)); ReportController reportController = new ReportController(serviceMoq.Object, AutomapperSingleton.Mapper); // Act var result = reportController.DeleteReport(reportId); // Assert serviceMoq.Verify(r => r.DeleteReport(reportId)); }