@Test void saveFactTranslation() { List<FactTranslation> factTranslations = Collections.singletonList(getFactTranslation()); when(factTranslationRepo.saveAll(factTranslations)).thenReturn(factTranslations); factTranslationService.saveFactTranslation(factTranslations); verify(factTranslationRepo, times(1)).saveAll(factTranslations); }
@Override public List<FactTranslation> saveFactTranslation(List<FactTranslation> factTranslations) { return factTranslationRepo.saveAll(factTranslations); }
FactTranslationServiceImpl implements FactTranslationService { @Override public List<FactTranslation> saveFactTranslation(List<FactTranslation> factTranslations) { return factTranslationRepo.saveAll(factTranslations); } }
FactTranslationServiceImpl implements FactTranslationService { @Override public List<FactTranslation> saveFactTranslation(List<FactTranslation> factTranslations) { return factTranslationRepo.saveAll(factTranslations); } @Autowired  FactTranslationServiceImpl(FactTranslationRepo factTranslationRepo, HabitFactService habitFactService,
                                      ModelMapper modelMapper); }
FactTranslationServiceImpl implements FactTranslationService { @Override public List<FactTranslation> saveFactTranslation(List<FactTranslation> factTranslations) { return factTranslationRepo.saveAll(factTranslations); } @Autowired  FactTranslationServiceImpl(FactTranslationRepo factTranslationRepo, HabitFactService habitFactService,
                                      ModelMapper modelMapper); @Override List<FactTranslation> saveHabitFactAndFactTranslation(HabitFactPostDTO habitFactPostDTO); @Override List<FactTranslation> saveFactTranslation(List<FactTranslation> factTranslations); @Cacheable(value = HABIT_FACT_OF_DAY_CACHE) @Override LanguageTranslationDTO getFactOfTheDay(Long languageId); }
FactTranslationServiceImpl implements FactTranslationService { @Override public List<FactTranslation> saveFactTranslation(List<FactTranslation> factTranslations) { return factTranslationRepo.saveAll(factTranslations); } @Autowired  FactTranslationServiceImpl(FactTranslationRepo factTranslationRepo, HabitFactService habitFactService,
                                      ModelMapper modelMapper); @Override List<FactTranslation> saveHabitFactAndFactTranslation(HabitFactPostDTO habitFactPostDTO); @Override List<FactTranslation> saveFactTranslation(List<FactTranslation> factTranslations); @Cacheable(value = HABIT_FACT_OF_DAY_CACHE) @Override LanguageTranslationDTO getFactOfTheDay(Long languageId);  }