diff --git a/src/test/java/fr/icdc/ebad/service/BatchServiceTest.java b/src/test/java/fr/icdc/ebad/service/BatchServiceTest.java index be3cfb6..f6d2e25 100644 --- a/src/test/java/fr/icdc/ebad/service/BatchServiceTest.java +++ b/src/test/java/fr/icdc/ebad/service/BatchServiceTest.java @@ -297,7 +297,7 @@ public void removeBatchsWithoutEnvironnement() { verify(logBatchRepository).deleteAllByBatchId(eq(1L)); verify(logBatchRepository).deleteAllByBatchId(eq(2L)); - verify(jobScheduler, times(1)).delete(eq("10")); + verify(jobScheduler, times(1)).deleteRecurringJob(eq("10")); verify(schedulingRepository, times(1)).delete(eq(scheduling)); verify(batchRepository).delete(batch1); @@ -440,7 +440,7 @@ public void testDeleteBatchById() { batchService.deleteBatch(1L); verify(logBatchRepository).deleteAllByBatchId(1L); verify(batchRepository).deleteById(1L); - verify(jobScheduler, times(1)).delete(eq("10")); + verify(jobScheduler, times(1)).deleteRecurringJob(eq("10")); verify(schedulingRepository, times(1)).delete(eq(scheduling)); } @@ -459,7 +459,7 @@ public void deleteBatch() { verify(logBatchRepository).deleteAllByBatchId(1L); verify(batchRepository).deleteById(1L); - verify(jobScheduler, times(1)).delete(eq("10")); + verify(jobScheduler, times(1)).deleteRecurringJob(eq("10")); verify(schedulingRepository, times(1)).delete(eq(scheduling)); } diff --git a/src/test/java/fr/icdc/ebad/service/EnvironnementServiceTest.java b/src/test/java/fr/icdc/ebad/service/EnvironnementServiceTest.java index 133d554..e17c2c2 100644 --- a/src/test/java/fr/icdc/ebad/service/EnvironnementServiceTest.java +++ b/src/test/java/fr/icdc/ebad/service/EnvironnementServiceTest.java @@ -167,7 +167,7 @@ public void deleteEnvironnement() { verify(batchRepository, times(1)).deleteAll(eq(environnement.getBatchs())); verify(directoryRepository, times(1)).deleteByEnvironnement(eq(environnement)); verify(environnementRepository, times(1)).delete(eq(environnement)); - verify(jobScheduler, times(1)).delete(eq("10")); + verify(jobScheduler, times(1)).deleteRecurringJob(eq("10")); verify(schedulingRepository, times(1)).delete(eq(scheduling)); } @@ -204,7 +204,7 @@ public void deleteEnvironnement2() { verify(batchRepository, times(0)).deleteAll(eq(environnement.getBatchs())); verify(directoryRepository, times(1)).deleteByEnvironnement(eq(environnement)); verify(environnementRepository, times(1)).delete(eq(environnement)); - verify(jobScheduler, times(1)).delete(eq("10")); + verify(jobScheduler, times(1)).deleteRecurringJob(eq("10")); verify(schedulingRepository, times(1)).delete(eq(scheduling)); }