Package org.apache.bval.jsr303

Examples of org.apache.bval.jsr303.ValidationTest$Foo


    // param
    petiteContainer.defineParameter("foo.data", "data");

    // get bean
    Foo foo = (Foo) petiteContainer.getBean("foo");

    assertEquals("ctor null null", foo.result);
    assertEquals("bar", foo.bar.toString());
    assertEquals("data", foo.data);
  }
View Full Code Here


    // param
    petiteContainer.defineParameter("foo.data", "data");

    // get bean
    Foo foo = (Foo) petiteContainer.getBean("foo");

    assertEquals("ctor bar null", foo.result);
    assertEquals("bar", foo.bar.toString());
    assertEquals("data", foo.data);
  }
View Full Code Here

    // param
    petiteContainer.defineParameter("foo.data", "data");

    // get bean
    Foo foo = (Foo) petiteContainer.getBean("foo");

    assertEquals("ctor bar data", foo.result);
    assertEquals("bar", foo.bar.toString());
    assertEquals("data", foo.data);
  }
View Full Code Here

package specialiseReturnType3;
import lib.specialiseReturnType3.Foo;
import java.util.*;
public class Main extends Foo {
  public static void main(String[] args) {
    Foo f = new Main();
    Collection c = f.getColl();
    System.out.println(c);
 
View Full Code Here

package static2;
import lib.static2.Foo;
public class Main {
  public static void main(String[] args) {
    new Foo().foo();
  }
View Full Code Here

    }

    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

TOP

Related Classes of org.apache.bval.jsr303.ValidationTest$Foo

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.