@Test public void saveHousekeeping() throws Exception { housekeepingOperationsService.saveHousekeeping(STU1, NEW_HOUSEKEEPING); verify(housekeepingRepository, times(1)).save(NEW_HOUSEKEEPING); verify(studyRepository, times(1)).save(STU1); verifyZeroInteractions(curationStatusRepository); verifyZeroInteractions(curatorRepository); assertThat(STU1.getHousekeeping()).isEqualToComparingFieldByField(NEW_HOUSEKEEPING); }
public void saveHousekeeping(Study study, Housekeeping housekeeping) { housekeeping.setLastUpdateDate(new Date()); housekeepingRepository.save(housekeeping); study.setHousekeeping(housekeeping); studyRepository.save(study); }
HousekeepingOperationsService { public void saveHousekeeping(Study study, Housekeeping housekeeping) { housekeeping.setLastUpdateDate(new Date()); housekeepingRepository.save(housekeeping); study.setHousekeeping(housekeeping); studyRepository.save(study); } }
HousekeepingOperationsService { public void saveHousekeeping(Study study, Housekeeping housekeeping) { housekeeping.setLastUpdateDate(new Date()); housekeepingRepository.save(housekeeping); study.setHousekeeping(housekeeping); studyRepository.save(study); } @Autowired  HousekeepingOperationsService(HousekeepingRepository housekeepingRepository,
                                         CuratorRepository curatorRepository,
                                         CurationStatusRepository curationStatusRepository,
                                         StudyRepository studyRepository); }
HousekeepingOperationsService { public void saveHousekeeping(Study study, Housekeeping housekeeping) { housekeeping.setLastUpdateDate(new Date()); housekeepingRepository.save(housekeeping); study.setHousekeeping(housekeeping); studyRepository.save(study); } @Autowired  HousekeepingOperationsService(HousekeepingRepository housekeepingRepository,
                                         CuratorRepository curatorRepository,
                                         CurationStatusRepository curationStatusRepository,
                                         StudyRepository studyRepository); Housekeeping createHousekeeping(); void saveHousekeeping(Study study, Housekeeping housekeeping); }
HousekeepingOperationsService { public void saveHousekeeping(Study study, Housekeeping housekeeping) { housekeeping.setLastUpdateDate(new Date()); housekeepingRepository.save(housekeeping); study.setHousekeeping(housekeeping); studyRepository.save(study); } @Autowired  HousekeepingOperationsService(HousekeepingRepository housekeepingRepository,
                                         CuratorRepository curatorRepository,
                                         CurationStatusRepository curationStatusRepository,
                                         StudyRepository studyRepository); Housekeeping createHousekeeping(); void saveHousekeeping(Study study, Housekeeping housekeeping);  }