@Test public void should_delete_report_by_id_and_tenant() { populateDatabase(evidenceAuditReportEntryKO, evidenceAuditReportEntryOK, evidenceAuditReportEntryWARN); evidenceAuditRepository.deleteReportByIdAndTenant(processId, TENANT_ID); FindIterable<Document> iterable = evidenceAuditReportCollection .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, evidenceAuditReportCollection); }
EvidenceAuditReportRepository extends ReportCommonRepository { public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, evidenceAuditReportCollection); } }
EvidenceAuditReportRepository extends ReportCommonRepository { public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, evidenceAuditReportCollection); } @VisibleForTesting  EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName);  EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess); }
EvidenceAuditReportRepository extends ReportCommonRepository { public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, evidenceAuditReportCollection); } @VisibleForTesting  EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName);  EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess); void bulkAppendReport(List<EvidenceAuditObjectModel> reports); void deleteReportByIdAndTenant(String processId, int tenantId); ReportResults computeVitamResults(String processId, Integer tenantId); MongoCursor<Document> findCollectionByProcessIdTenant(String processId, int tenantId); MongoCursor<Document> findCollectionByProcessIdTenantAndStatus(String processId, int tenantId,
        String... status); EvidenceAuditStatsModel stats(String processId, int tenantId); }
EvidenceAuditReportRepository extends ReportCommonRepository { public void deleteReportByIdAndTenant(String processId, int tenantId) { super.deleteReportByIdAndTenant(processId, tenantId, evidenceAuditReportCollection); } @VisibleForTesting  EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess, String collectionName);  EvidenceAuditReportRepository(MongoDbAccess mongoDbAccess); void bulkAppendReport(List<EvidenceAuditObjectModel> reports); void deleteReportByIdAndTenant(String processId, int tenantId); ReportResults computeVitamResults(String processId, Integer tenantId); MongoCursor<Document> findCollectionByProcessIdTenant(String processId, int tenantId); MongoCursor<Document> findCollectionByProcessIdTenantAndStatus(String processId, int tenantId,
        String... status); EvidenceAuditStatsModel stats(String processId, int tenantId); static final String EVIDENCE_AUDIT; }