@Test public void testValidNames() { final String[] validNames = {"abc", "def", "123","group123","group_123."}; for (final String name : validNames) { final GroupNameRule rule = new GroupNameRule(name); assertTrue(rule.isValid()); rule.validate(); } }
@Override public void validate() throws BadRequestException { if (!isValid()) { throw new BadRequestException(getMessageResponseStatus(), getMessage()); } }
GroupNameRule extends ValidNameRule { @Override public void validate() throws BadRequestException { if (!isValid()) { throw new BadRequestException(getMessageResponseStatus(), getMessage()); } } }
GroupNameRule extends ValidNameRule { @Override public void validate() throws BadRequestException { if (!isValid()) { throw new BadRequestException(getMessageResponseStatus(), getMessage()); } } GroupNameRule(final String theName); }
GroupNameRule extends ValidNameRule { @Override public void validate() throws BadRequestException { if (!isValid()) { throw new BadRequestException(getMessageResponseStatus(), getMessage()); } } GroupNameRule(final String theName); @Override void validate(); }
GroupNameRule extends ValidNameRule { @Override public void validate() throws BadRequestException { if (!isValid()) { throw new BadRequestException(getMessageResponseStatus(), getMessage()); } } GroupNameRule(final String theName); @Override void validate();  }