@Test public void canCloseShouldReturnFalseWhenNameIsInvalid() throws Exception { final boolean actual = underTest.canClose("private"); assertThat(actual) .overridingErrorMessage("Expected value returned by canClose is false, but was true") .isFalse(); }
@Override @SuppressWarnings("RedundantIfStatement") public boolean canClose(@Nullable String name) { return nameHelper.isQualifiedName(name); }
NameValidator implements InputValidatorEx { @Override @SuppressWarnings("RedundantIfStatement") public boolean canClose(@Nullable String name) { return nameHelper.isQualifiedName(name); } }
NameValidator implements InputValidatorEx { @Override @SuppressWarnings("RedundantIfStatement") public boolean canClose(@Nullable String name) { return nameHelper.isQualifiedName(name); } @Inject  NameValidator(@Nonnull Json2JavaBundle bundle, @Nonnull PsiNameHelper nameHelper); }
NameValidator implements InputValidatorEx { @Override @SuppressWarnings("RedundantIfStatement") public boolean canClose(@Nullable String name) { return nameHelper.isQualifiedName(name); } @Inject  NameValidator(@Nonnull Json2JavaBundle bundle, @Nonnull PsiNameHelper nameHelper); @Nullable @Override String getErrorText(@Nullable String name); @Override boolean checkInput(@Nullable String name); @Override @SuppressWarnings("RedundantIfStatement") boolean canClose(@Nullable String name); }
NameValidator implements InputValidatorEx { @Override @SuppressWarnings("RedundantIfStatement") public boolean canClose(@Nullable String name) { return nameHelper.isQualifiedName(name); } @Inject  NameValidator(@Nonnull Json2JavaBundle bundle, @Nonnull PsiNameHelper nameHelper); @Nullable @Override String getErrorText(@Nullable String name); @Override boolean checkInput(@Nullable String name); @Override @SuppressWarnings("RedundantIfStatement") boolean canClose(@Nullable String name);  }