Package org.apache.bval.jsr303

Examples of org.apache.bval.jsr303.CircularReferencesTest


    }

    public void testParse() {
        ValidationParser vp = new ValidationParser("sample-validation.xml");
        ConfigurationImpl config =
              new ConfigurationImpl(null, new ApacheValidationProvider());
        vp.processValidationConfig(config);
    }
View Full Code Here


    private final ValidatorFactory validatorFactory;

    @Inject
    public ValidatorFactoryProvider(ConfigurationState configurationState) {
        this.validatorFactory = new ApacheValidationProvider().buildValidatorFactory(configurationState);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public ValidatorFactory get()
    {
        return new ApacheValidationProvider().buildValidatorFactory( configurationState );
    }
View Full Code Here

        System.setProperty(ValidatorBuilder.VALIDATION_PROVIDER_KEY, CustomValidatorProvider.class.getName());
    }

    @AfterClass
    public static void resetProvider() {
        CustomValidatorProvider.provider = new ApacheValidationProvider();
        System.clearProperty(ValidatorBuilder.VALIDATION_PROVIDER_KEY);
    }
View Full Code Here

        Validator validator = factory.getValidator();
        assertNotNull(validator);
    }

    private ValidatorFactory getFactory() {
        ApacheValidatorConfiguration config =
              Validation.byProvider(ApacheValidationProvider.class).configure();
        config.addProperty(VALIDATION_XML_PATH, "sample-validation.xml");
        return config.buildValidatorFactory();
    }
View Full Code Here

    private final ApacheValidatorFactory validatorFactory;

    @Inject
    public ValidatorFactoryProvider(ConfigurationState configurationState) {
        this.validatorFactory = new ApacheValidatorFactory();
        this.validatorFactory.configure(configurationState);
    }
View Full Code Here

        return new TestSuite(MethodValidatorImplTest.class);
    }

    public void testUnwrap() {
        Validator v = getValidator();
        ClassValidator cv = v.unwrap(ClassValidator.class);
        assertTrue(v == cv);
        assertTrue(v == v.unwrap(Validator.class));
        MethodValidatorImpl mvi = v.unwrap(MethodValidatorImpl.class);
        assertNotNull(mvi);
        MethodValidator mv = v.unwrap(MethodValidator.class);
View Full Code Here

        return new TestSuite(MethodValidatorImplTest.class);
    }

    public void testUnwrap() {
        Validator v = getValidator();
        ClassValidator cv = v.unwrap(ClassValidator.class);
        assertTrue(v == cv);
        assertTrue(v == v.unwrap(Validator.class));
        MethodValidatorImpl mvi = v.unwrap(MethodValidatorImpl.class);
        assertNotNull(mvi);
        MethodValidator mv = v.unwrap(MethodValidator.class);
View Full Code Here

        super(name);
    }

    public void testParse() {
        ValidationParser vp = new ValidationParser("sample-validation.xml");
        ConfigurationImpl config =
              new ConfigurationImpl(null, new ApacheValidationProvider());
        vp.processValidationConfig(config);
    }
View Full Code Here

    private final ConfigurationImpl configurationState;

    @Inject
    public ConfigurationStateProvider(ValidationProvider<?> aProvider) {
        this.configurationState = new ConfigurationImpl(null, aProvider);
    }
View Full Code Here

TOP

Related Classes of org.apache.bval.jsr303.CircularReferencesTest

Copyright © 2018 www.massapicom. 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.