@Test public void testGetPlaceholderSentenceWhenTypeIsBuiltInTypeWithoutDefinedSentence() { final String expectedPlaceholder = "Enter a valid expression"; when(translationService.format("ConstraintPlaceholderHelper.SentenceDefault")).thenReturn(expectedPlaceholder); final String actualPlaceholder = placeholderHelper.getPlaceholderSentence("context"); assertEquals(expectedPlaceholder, actualPlaceholder); }
public String getPlaceholderSentence(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SENTENCE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSentence(); }
ConstraintPlaceholderHelper { public String getPlaceholderSentence(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SENTENCE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSentence(); } }
ConstraintPlaceholderHelper { public String getPlaceholderSentence(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SENTENCE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSentence(); } @Inject  ConstraintPlaceholderHelper(final TranslationService translationService); }
ConstraintPlaceholderHelper { public String getPlaceholderSentence(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SENTENCE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSentence(); } @Inject  ConstraintPlaceholderHelper(final TranslationService translationService); String getPlaceholderSentence(final String type); String getPlaceholderSample(final String type); }
ConstraintPlaceholderHelper { public String getPlaceholderSentence(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SENTENCE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSentence(); } @Inject  ConstraintPlaceholderHelper(final TranslationService translationService); String getPlaceholderSentence(final String type); String getPlaceholderSample(final String type);  }