@Test public void shouldGetAll() throws Exception { List<ProcessingSchedule> scheduleList = new ArrayList<>(); scheduleList.add(new ProcessingSchedule()); when(processingScheduleMapper.getAll()).thenReturn(scheduleList); List<ProcessingSchedule> schedules = repository.getAll(); assertThat(schedules, is(scheduleList)); }
public List<ProcessingSchedule> getAll() { return processingScheduleMapper.getAll(); }
ProcessingScheduleRepository { public List<ProcessingSchedule> getAll() { return processingScheduleMapper.getAll(); } }
ProcessingScheduleRepository { public List<ProcessingSchedule> getAll() { return processingScheduleMapper.getAll(); } @Autowired  ProcessingScheduleRepository(ProcessingScheduleMapper processingScheduleMapper); }
ProcessingScheduleRepository { public List<ProcessingSchedule> getAll() { return processingScheduleMapper.getAll(); } @Autowired  ProcessingScheduleRepository(ProcessingScheduleMapper processingScheduleMapper); List<ProcessingSchedule> getAll(); void create(ProcessingSchedule processingSchedule); ProcessingSchedule get(Long id); void update(ProcessingSchedule processingSchedule); ProcessingSchedule getByCode(String code); }
ProcessingScheduleRepository { public List<ProcessingSchedule> getAll() { return processingScheduleMapper.getAll(); } @Autowired  ProcessingScheduleRepository(ProcessingScheduleMapper processingScheduleMapper); List<ProcessingSchedule> getAll(); void create(ProcessingSchedule processingSchedule); ProcessingSchedule get(Long id); void update(ProcessingSchedule processingSchedule); ProcessingSchedule getByCode(String code);  }