Examples of validate()


Examples of org.openengsb.ui.common.editor.NumberValidator.validate()

public class NumberValidatorTest {

    @Test
    public void testPassLetterInsteadOfNumber_shouldNotValidateAndGiveErrorMessage() throws Exception {
        NumberValidator numberValidator = new NumberValidator();
        SingleAttributeValidationResult validate = numberValidator.validate("A");
        assertFalse(validate.isValid());
        assertEquals("validation.number.formating", validate.getErrorMessageId());
    }

    // TODO: [OPENENGSB-1250] public void testUsingGermanLocale_shouldReturnGermanMessage() {
View Full Code Here

Examples of org.openfaces.validator.EqualValidator.validate()


    public Validator validator(FacesContext context, UIComponent component, Object value) {
        EqualValidator e = new EqualValidator();
        e.setFor("first");
        e.validate(context, component, value);
        return e;
    }

    public Validator getValidator() {
        EqualValidator e = new EqualValidator();
View Full Code Here

Examples of org.opengis.feature.simple.SimpleFeature.validate()

       
        assertNotNull(feature);
       
        try{
            feature = SimpleFeatureBuilder.build( featureType, new Object[]{"Longer Than 5"}, "ID" );
            feature.validate();
            fail("this should fail because the value is longer than 5 characters");
        }catch (Exception e) {
            // good
      }
    }
View Full Code Here

Examples of org.opengis.test.ValidatorContainer.validate()

     * the check for the {@code DefaultVerticalCRS.ELLIPSOIDAL_HEIGHT} constant.</p>
     */
    @Test
    public void validate() {
        final ValidatorContainer validators = new ValidatorContainer();
        validators.validate(WGS84);
        validators.validate(WGS84_3D);
        validators.validate(ELLIPSOIDAL_HEIGHT);
        validators.validate(GRAVITY_RELATED_HEIGHT);
        validators.validate(TIME);
        validators.validate(SPHERICAL);
View Full Code Here

Examples of org.openid4java.message.AuthSuccess.validate()

        }

        AuthSuccess authResp = AuthSuccess.createAuthSuccess(response);
        _log.info("Received positive auth response.");

        authResp.validate();

        result.setAuthResponse(authResp);

        // [1/4] return_to verification
        if (! verifyReturnTo(receivingUrl, authResp))
View Full Code Here

Examples of org.openid4java.message.VerifyResponse.validate()

            if (HttpStatus.SC_OK == respCode)
            {
                VerifyResponse vrfyResp =
                        VerifyResponse.createVerifyResponse(responseParams);

                vrfyResp.validate();

                if (vrfyResp.isSignatureVerified())
                {
                    // process the optional invalidate_handle first
                    String invalidateHandle = vrfyResp.getInvalidateHandle();
View Full Code Here

Examples of org.openrdf.repository.config.RepositoryConfig.validate()

  private RepositoryConfig parse(Model config)
    throws StoreConfigException
  {
    RepositoryConfig repConfig = RepositoryConfig.create(config);
    repConfig.validate();
    return repConfig;
  }

  @Override
  public RepositoryInfo getRepositoryInfo(String id)
View Full Code Here

Examples of org.opensaml.security.SAMLSignatureProfileValidator.validate()

    public void validateSignatureAgainstProfile() throws WSSecurityException {
        Signature sig = getSignature();
        if (sig != null) {
            SAMLSignatureProfileValidator validator = new SAMLSignatureProfileValidator();
            try {
                validator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException("SAML signature validation failed", ex);
            }
        }
    }
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureTrustEngine.validate()

        // Some bindings allow candidate signing credentials to be supplied (e.g. via ds:KeyInfo), some do not.
        // So have 2 slightly different cases.
        try {
            if (candidateCredentials == null || candidateCredentials.isEmpty()) {
                if (engine.validate(signature, signedContent, algorithmURI, criteriaSet, null)) {
                    log.debug("Simple signature validation (with no request-derived credentials) was successful");
                    return true;
                } else {
                    log.warn("Simple signature validation (with no request-derived credentials) failed");
                    return false;
View Full Code Here

Examples of org.opensaml.xml.signature.SignatureValidator.validate()

                    new Object[]{"cannot get certificate or key"}
                );
            }
            SignatureValidator sigValidator = new SignatureValidator(credential);
            try {
                sigValidator.validate(sig);
            } catch (ValidationException ex) {
                throw new WSSecurityException("SAML signature validation failed", ex);
            }
            signatureKeyInfo = samlKeyInfo;
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.