@Test public void testGetPlaceholderSampleWhenTypeIsBuiltInTypeWithoutDefinedSample() { final String expectedPlaceholder = "Insert a value"; when(translationService.format("ConstraintPlaceholderHelper.SampleDefault")).thenReturn(expectedPlaceholder); final String actualPlaceholder = placeholderHelper.getPlaceholderSample("context"); assertEquals(expectedPlaceholder, actualPlaceholder); }
public String getPlaceholderSample(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SAMPLE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSample(); }
ConstraintPlaceholderHelper { public String getPlaceholderSample(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SAMPLE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSample(); } }
ConstraintPlaceholderHelper { public String getPlaceholderSample(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SAMPLE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSample(); } @Inject  ConstraintPlaceholderHelper(final TranslationService translationService); }
ConstraintPlaceholderHelper { public String getPlaceholderSample(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SAMPLE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSample(); } @Inject  ConstraintPlaceholderHelper(final TranslationService translationService); String getPlaceholderSentence(final String type); String getPlaceholderSample(final String type); }
ConstraintPlaceholderHelper { public String getPlaceholderSample(final String type) { final String sentence = getTranslation(type, CONSTRAINT_PLACEHOLDER_SAMPLE_PREFIX); return !isEmpty(sentence) ? sentence : defaultSample(); } @Inject  ConstraintPlaceholderHelper(final TranslationService translationService); String getPlaceholderSentence(final String type); String getPlaceholderSample(final String type);  }