@Test public void getErrorTextShouldReturnTextWhenInvalid() throws Exception { final String actual = underTest.getErrorText("^Foo"); assertThat(actual) .overridingErrorMessage("Expected value returned by getErrorText is null, but was <%s>", actual) .isNotEmpty(); }
@Nullable @Override public String getErrorText(@Nullable String suffix) { if (canClose(suffix)) { return null; } return bundle.message("error.message.validator.class.suffix", suffix); }
ClassSuffixValidator implements InputValidatorEx { @Nullable @Override public String getErrorText(@Nullable String suffix) { if (canClose(suffix)) { return null; } return bundle.message("error.message.validator.class.suffix", suffix); } }
ClassSuffixValidator implements InputValidatorEx { @Nullable @Override public String getErrorText(@Nullable String suffix) { if (canClose(suffix)) { return null; } return bundle.message("error.message.validator.class.suffix", suffix); } @Inject  ClassSuffixValidator(@NotNull Json2JavaBundle bundle, @NotNull PsiNameHelper nameHelper); }
ClassSuffixValidator implements InputValidatorEx { @Nullable @Override public String getErrorText(@Nullable String suffix) { if (canClose(suffix)) { return null; } return bundle.message("error.message.validator.class.suffix", suffix); } @Inject  ClassSuffixValidator(@NotNull Json2JavaBundle bundle, @NotNull PsiNameHelper nameHelper); @Nullable @Override String getErrorText(@Nullable String suffix); @Override boolean checkInput(@Nullable String suffix); @Override boolean canClose(@Nullable String suffix); }
ClassSuffixValidator implements InputValidatorEx { @Nullable @Override public String getErrorText(@Nullable String suffix) { if (canClose(suffix)) { return null; } return bundle.message("error.message.validator.class.suffix", suffix); } @Inject  ClassSuffixValidator(@NotNull Json2JavaBundle bundle, @NotNull PsiNameHelper nameHelper); @Nullable @Override String getErrorText(@Nullable String suffix); @Override boolean checkInput(@Nullable String suffix); @Override boolean canClose(@Nullable String suffix);  }