@Test public void should_delete_report_by_id_and_tenant() { populateDatabase(auditReportEntryKO, auditReportEntryOK, auditReportEntryWARNING); repository.deleteReportByIdAndTenant(processId, TENANT_ID); FindIterable<Document> iterable = auditReportCollection .find(and(eq("processId", processId), eq("tenantId", TENANT_ID))); MongoCursor<Document> iterator = iterable.iterator(); List<Document> documents = new ArrayList<>(); while (iterator.hasNext()) { documents.add(iterator.next()); } assertThat(documents).isEmpty(); assertThat(documents.size()).isEqualTo(0); }
public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, objectGroupReportCollection); }
AuditReportRepository extends ReportCommonRepository { public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, objectGroupReportCollection); } }
AuditReportRepository extends ReportCommonRepository { public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, objectGroupReportCollection); } @VisibleForTesting  AuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName);  AuditReportRepository(MongoDbAccess mongoDbAccess); }
AuditReportRepository extends ReportCommonRepository { public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, objectGroupReportCollection); } @VisibleForTesting  AuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName);  AuditReportRepository(MongoDbAccess mongoDbAccess); void bulkAppendReport(List<AuditObjectGroupModel> reports); void deleteReportByIdAndTenant(String processId, int tenantId); ReportResults computeVitamResults(String processId, Integer tenantId); MongoCursor<Document> findCollectionByProcessIdTenantAndStatus(String processId, int tenantId,
            String... status); MongoCursor<Document> findCollectionByProcessIdTenant(String processId, int tenantId); AuditStatsModel stats(String processId, int tenantId); }
AuditReportRepository extends ReportCommonRepository { public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, objectGroupReportCollection); } @VisibleForTesting  AuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName);  AuditReportRepository(MongoDbAccess mongoDbAccess); void bulkAppendReport(List<AuditObjectGroupModel> reports); void deleteReportByIdAndTenant(String processId, int tenantId); ReportResults computeVitamResults(String processId, Integer tenantId); MongoCursor<Document> findCollectionByProcessIdTenantAndStatus(String processId, int tenantId,
            String... status); MongoCursor<Document> findCollectionByProcessIdTenant(String processId, int tenantId); AuditStatsModel stats(String processId, int tenantId); static final String AUDIT_OBJECT_GROUP; }