@Test public void check_whitespaces_not_accepted_inside_id() { assertFalse(validationToTest.validate("12345 6").isValid()); assertFalse(validationToTest.validate(" 123456").isValid()); assertFalse(validationToTest.validate("123456 ").isValid()); assertFalse(validationToTest.validate("123456\n").isValid()); assertFalse(validationToTest.validate("123456\r").isValid()); }
@Override protected void validate(ValidationContext<String> context) { validateNotNull(context); validateWithoutWhitespaces(context); validateOnlyAlphabeticDigitOrAllowedParts(context, '.','-','_'); validateLength(context); }
MappingIdValidationImpl extends AbstractSimpleStringValidation implements MappingIdValidation { @Override protected void validate(ValidationContext<String> context) { validateNotNull(context); validateWithoutWhitespaces(context); validateOnlyAlphabeticDigitOrAllowedParts(context, '.','-','_'); validateLength(context); } }
MappingIdValidationImpl extends AbstractSimpleStringValidation implements MappingIdValidation { @Override protected void validate(ValidationContext<String> context) { validateNotNull(context); validateWithoutWhitespaces(context); validateOnlyAlphabeticDigitOrAllowedParts(context, '.','-','_'); validateLength(context); }  }
MappingIdValidationImpl extends AbstractSimpleStringValidation implements MappingIdValidation { @Override protected void validate(ValidationContext<String> context) { validateNotNull(context); validateWithoutWhitespaces(context); validateOnlyAlphabeticDigitOrAllowedParts(context, '.','-','_'); validateLength(context); }   }
MappingIdValidationImpl extends AbstractSimpleStringValidation implements MappingIdValidation { @Override protected void validate(ValidationContext<String> context) { validateNotNull(context); validateWithoutWhitespaces(context); validateOnlyAlphabeticDigitOrAllowedParts(context, '.','-','_'); validateLength(context); }    }