From 234eacca0c0a52dc49be80d994269d9ae1f08255 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Sat, 11 Nov 2023 20:26:03 +0100 Subject: [PATCH] ScheduleNow test with running advanced Schedule --- backend/src/test/java/core/schedules/ScheduleServiceTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/test/java/core/schedules/ScheduleServiceTest.java b/backend/src/test/java/core/schedules/ScheduleServiceTest.java index c80452a..737de26 100644 --- a/backend/src/test/java/core/schedules/ScheduleServiceTest.java +++ b/backend/src/test/java/core/schedules/ScheduleServiceTest.java @@ -161,6 +161,10 @@ public class ScheduleServiceTest { ServiceResult result_3 = taskScheduleService.scheduleNow(entityManager.find(Task.class, 5L)); assertEquals(ServiceExitCode.OK, result_3.getExitCode()); assertThat(entityManager.find(BasicTaskSchedule.class, result_3.getResult().getScheduleID())).isNotNull(); + + //Situation 4: Running Advanced Schedule + ServiceResult result_4 = taskScheduleService.scheduleNow(entityManager.find(Task.class, 17L)); + assertEquals(ServiceExitCode.ENTITY_ALREADY_EXIST, result_4.getExitCode()); } @Test