@Test public void save() { when(adviceService.save(advicePostDTO)).thenReturn(advice); assertEquals(advice, adviceService.save(advicePostDTO)); }
@Override public Advice save(AdvicePostDTO advicePostDTO) { return adviceRepo.save(modelMapper.map(advicePostDTO, Advice.class)); }
AdviceServiceImpl implements AdviceService { @Override public Advice save(AdvicePostDTO advicePostDTO) { return adviceRepo.save(modelMapper.map(advicePostDTO, Advice.class)); } }
AdviceServiceImpl implements AdviceService { @Override public Advice save(AdvicePostDTO advicePostDTO) { return adviceRepo.save(modelMapper.map(advicePostDTO, Advice.class)); } @Autowired  AdviceServiceImpl(AdviceRepo adviceRepo, HabitDictionaryRepo habitDictionaryRepo,
                             AdviceTranslationRepo adviceTranslationRepo, ModelMapper modelMapper); }
AdviceServiceImpl implements AdviceService { @Override public Advice save(AdvicePostDTO advicePostDTO) { return adviceRepo.save(modelMapper.map(advicePostDTO, Advice.class)); } @Autowired  AdviceServiceImpl(AdviceRepo adviceRepo, HabitDictionaryRepo habitDictionaryRepo,
                             AdviceTranslationRepo adviceTranslationRepo, ModelMapper modelMapper); @Override List<LanguageTranslationDTO> getAllAdvices(); @Override LanguageTranslationDTO getRandomAdviceByHabitIdAndLanguage(Long id, String language); @Override AdviceDTO getAdviceById(Long id); @Override AdviceDTO getAdviceByName(String language, String name); @Override Advice save(AdvicePostDTO advicePostDTO); @Override Advice update(AdvicePostDTO advice, Long id); @Override Long delete(Long id); }
AdviceServiceImpl implements AdviceService { @Override public Advice save(AdvicePostDTO advicePostDTO) { return adviceRepo.save(modelMapper.map(advicePostDTO, Advice.class)); } @Autowired  AdviceServiceImpl(AdviceRepo adviceRepo, HabitDictionaryRepo habitDictionaryRepo,
                             AdviceTranslationRepo adviceTranslationRepo, ModelMapper modelMapper); @Override List<LanguageTranslationDTO> getAllAdvices(); @Override LanguageTranslationDTO getRandomAdviceByHabitIdAndLanguage(Long id, String language); @Override AdviceDTO getAdviceById(Long id); @Override AdviceDTO getAdviceByName(String language, String name); @Override Advice save(AdvicePostDTO advicePostDTO); @Override Advice update(AdvicePostDTO advice, Long id); @Override Long delete(Long id);  }