CreateNewClassDialogValidatorExImpl implements CreateNewClassDialogValidatorEx { @Override public boolean checkInterface(@NotNull String inputString) { return checkQualifiedName(inputString); } CreateNewClassDialogValidatorExImpl(Project project); static boolean isValidJavaIdentifier(String identifier); @Override boolean checkSuperclass(@NotNull String inputString); @Override boolean checkInterface(@NotNull String inputString); @Override boolean checkPackage(@NotNull String inputString); @Nullable @Override String getErrorText(String inputString); @NotNull @Override String getNameErrorText(@Nullable String inputString); @NotNull @Override String getSuperclassErrorText(@Nullable String inputString); @NotNull @Override String getInterfacesErrorText(@Nullable String inputString); @NotNull @Override String getNotAClassErrorText(@Nullable String inputString); @NotNull @Override String getNotAnInterfaceErrorText(@Nullable String inputString); @NotNull @Override String getPackageErrorText(@Nullable String inputString); @Override boolean checkInput(String inputString); @Override boolean canClose(String inputString); static final String INVALID_PACKAGE_MESSAGE; static final String INVALID_QUALIFIED_NAME_FOR_NEW_NAME; static final String INVALID_QUALIFIED_NAME_FOR_INTERFACE; static final String INVALID_QUALIFIED_NAME_FOR_SUPERCLASS; static final String INVALID_QUALIFIED_NAME; static final String NOT_A_VALID_INTERFACE; static final String NOT_A_VALID_CLASS; }
@Test public void checkInterfacesGood() { assertTrue(validator.checkInterface("_abc123_XYZ_")); }
@Test public void checkInterfacesEmpty() { assertTrue(validator.checkInterface("")); }
@Test public void checkInterfacesLeadingNumber() { assertFalse(validator.checkInterface("8a")); }
@Test public void checkInterfacesDashInName() { assertFalse(validator.checkInterface("a-b")); }