schedule-refactor #45
@ -30,6 +30,6 @@ public class ScheduleRepositoryTest {
|
|||||||
User referenceUser_2 = entityManager.find(User.class, 2L);
|
User referenceUser_2 = entityManager.find(User.class, 2L);
|
||||||
|
|
||||||
assertEquals(0, scheduleRepository.findAllByUsername(referenceUser_2.getUsername()).size());
|
assertEquals(0, scheduleRepository.findAllByUsername(referenceUser_2.getUsername()).size());
|
||||||
assertEquals(2, scheduleRepository.findAllByUsername(referenceUser_1.getUsername()).size());
|
assertEquals(3, scheduleRepository.findAllByUsername(referenceUser_1.getUsername()).size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,9 +48,10 @@ public class ScheduleServiceTest {
|
|||||||
assertEquals(0, taskScheduleService.getAllSchedulesOfUser(username2).size());
|
assertEquals(0, taskScheduleService.getAllSchedulesOfUser(username2).size());
|
||||||
|
|
||||||
List<AbstractSchedule> result_1 = taskScheduleService.getAllSchedulesOfUser(username);
|
List<AbstractSchedule> result_1 = taskScheduleService.getAllSchedulesOfUser(username);
|
||||||
assertEquals(2, result_1.size());
|
assertEquals(3, result_1.size());
|
||||||
assertTrue(result_1.contains(entityManager.find(AbstractSchedule.class, 1L)));
|
assertTrue(result_1.contains(entityManager.find(AbstractSchedule.class, 1L)));
|
||||||
assertTrue(result_1.contains(entityManager.find(AbstractSchedule.class, 2L)));
|
assertTrue(result_1.contains(entityManager.find(AbstractSchedule.class, 2L)));
|
||||||
|
assertTrue(result_1.contains(entityManager.find(AbstractSchedule.class, 3L)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user