@Test public void https_www_google_de_is_allowed() throws Exception { URI uri = new URI("https: ValidationResult result = validationToTest.validate(uri); assertTrue(result.isValid()); }
@Override protected void validate(ValidationContext<URI> context) { validateNotNull(context); URI uri = context.objectToValidate; if (uri == null) { return; } String simpleString = uri.toString().trim(); if (simpleString.isEmpty()) { addErrorMessage(context, "May not be empty!"); return; } }
URIValidationImpl extends AbstractValidation<URI> implements URIValidation { @Override protected void validate(ValidationContext<URI> context) { validateNotNull(context); URI uri = context.objectToValidate; if (uri == null) { return; } String simpleString = uri.toString().trim(); if (simpleString.isEmpty()) { addErrorMessage(context, "May not be empty!"); return; } } }
URIValidationImpl extends AbstractValidation<URI> implements URIValidation { @Override protected void validate(ValidationContext<URI> context) { validateNotNull(context); URI uri = context.objectToValidate; if (uri == null) { return; } String simpleString = uri.toString().trim(); if (simpleString.isEmpty()) { addErrorMessage(context, "May not be empty!"); return; } }  }
URIValidationImpl extends AbstractValidation<URI> implements URIValidation { @Override protected void validate(ValidationContext<URI> context) { validateNotNull(context); URI uri = context.objectToValidate; if (uri == null) { return; } String simpleString = uri.toString().trim(); if (simpleString.isEmpty()) { addErrorMessage(context, "May not be empty!"); return; } }   }
URIValidationImpl extends AbstractValidation<URI> implements URIValidation { @Override protected void validate(ValidationContext<URI> context) { validateNotNull(context); URI uri = context.objectToValidate; if (uri == null) { return; } String simpleString = uri.toString().trim(); if (simpleString.isEmpty()) { addErrorMessage(context, "May not be empty!"); return; } }    }