@Test public void shouldGetCustomizedText() { String originalText = "original"; String customText = "custom"; when(customizedTextDao.findCustomizedTextByOriginalText(originalText)).thenReturn( new CustomizedText(originalText, customText)); CustomizedTextDto customizedTextDto = customizedTextServiceFacadeWebTier.getCustomizedTextDto(originalText); assertThat(customizedTextDto.getOriginalText(), is(originalText)); assertThat(customizedTextDto.getCustomText(), is(customText)); }
@Override public CustomizedTextDto getCustomizedTextDto(String originalText) { CustomizedText customizedText = customizedTextDao.findCustomizedTextByOriginalText(originalText); return new CustomizedTextDto(customizedText.getOriginalText(), customizedText.getCustomText()); }
CustomizedTextServiceFacadeWebTier implements CustomizedTextServiceFacade { @Override public CustomizedTextDto getCustomizedTextDto(String originalText) { CustomizedText customizedText = customizedTextDao.findCustomizedTextByOriginalText(originalText); return new CustomizedTextDto(customizedText.getOriginalText(), customizedText.getCustomText()); } }
CustomizedTextServiceFacadeWebTier implements CustomizedTextServiceFacade { @Override public CustomizedTextDto getCustomizedTextDto(String originalText) { CustomizedText customizedText = customizedTextDao.findCustomizedTextByOriginalText(originalText); return new CustomizedTextDto(customizedText.getOriginalText(), customizedText.getCustomText()); } @Autowired  CustomizedTextServiceFacadeWebTier(CustomizedTextDao customizedTextDao, MessageSource messageSource); }
CustomizedTextServiceFacadeWebTier implements CustomizedTextServiceFacade { @Override public CustomizedTextDto getCustomizedTextDto(String originalText) { CustomizedText customizedText = customizedTextDao.findCustomizedTextByOriginalText(originalText); return new CustomizedTextDto(customizedText.getOriginalText(), customizedText.getCustomText()); } @Autowired  CustomizedTextServiceFacadeWebTier(CustomizedTextDao customizedTextDao, MessageSource messageSource); @Override void addOrUpdateCustomizedText(String originalText, String customText); @Override void removeCustomizedText(String originalText); @Override Map<String, String> retrieveCustomizedText(); @Override String replaceSubstitutions(String message); @Override CustomizedTextDto getCustomizedTextDto(String originalText); @Override void convertMigratedLabelKeysToLocalizedText(Locale locale); }
CustomizedTextServiceFacadeWebTier implements CustomizedTextServiceFacade { @Override public CustomizedTextDto getCustomizedTextDto(String originalText) { CustomizedText customizedText = customizedTextDao.findCustomizedTextByOriginalText(originalText); return new CustomizedTextDto(customizedText.getOriginalText(), customizedText.getCustomText()); } @Autowired  CustomizedTextServiceFacadeWebTier(CustomizedTextDao customizedTextDao, MessageSource messageSource); @Override void addOrUpdateCustomizedText(String originalText, String customText); @Override void removeCustomizedText(String originalText); @Override Map<String, String> retrieveCustomizedText(); @Override String replaceSubstitutions(String message); @Override CustomizedTextDto getCustomizedTextDto(String originalText); @Override void convertMigratedLabelKeysToLocalizedText(Locale locale);  }