@Test public void canCloseShouldReturnFalseWhenInvalid() throws Exception { final boolean actual = underTest.canClose("+-/*"); assertThat(actual) .overridingErrorMessage("Expected value returned by canClose is false, but was true") .isFalse(); }
@Override public boolean canClose(@Nullable String suffix) { if (Strings.isNullOrEmpty(suffix)) { return true; } return nameHelper.isIdentifier(suffix); }
ClassSuffixValidator implements InputValidatorEx { @Override public boolean canClose(@Nullable String suffix) { if (Strings.isNullOrEmpty(suffix)) { return true; } return nameHelper.isIdentifier(suffix); } }
ClassSuffixValidator implements InputValidatorEx { @Override public boolean canClose(@Nullable String suffix) { if (Strings.isNullOrEmpty(suffix)) { return true; } return nameHelper.isIdentifier(suffix); } @Inject  ClassSuffixValidator(@NotNull Json2JavaBundle bundle, @NotNull PsiNameHelper nameHelper); }
ClassSuffixValidator implements InputValidatorEx { @Override public boolean canClose(@Nullable String suffix) { if (Strings.isNullOrEmpty(suffix)) { return true; } return nameHelper.isIdentifier(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 { @Override public boolean canClose(@Nullable String suffix) { if (Strings.isNullOrEmpty(suffix)) { return true; } return nameHelper.isIdentifier(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);  }