Package org.hibernate.jsr303.tck.tests.bootstrap

Examples of org.hibernate.jsr303.tck.tests.bootstrap.CustomMessageInterpolatorTest$Person


     * @see Person#getAge()
     */
    @Test
    public void getAllPersonsEligibleToVote() {
        List<Person> potentialVoters =
                new ArrayList<>(asList(new Person("Tom", 24), new Person("Dick", 75), new Person("Harry", 17)));

        int legalAgeOfVoting = 18;
        List<Person> eligibleVoters = VotingRules.eligibleVoters(potentialVoters, legalAgeOfVoting);

        assertThat(eligibleVoters, hasSize(2));
View Full Code Here


  public void testCustomValidationProviderResolution() {
    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( new TCKValidationProvider() );
        return list;
      }
    };

    GenericBootstrap bootstrap = Validation.byDefaultProvider();
View Full Code Here

  public void testSpecificValidationProvider() {
    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( new TCKValidationProvider() );
        return list;
      }
    };

    // with resolver
View Full Code Here

    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( TestUtil.getValidationProviderUnderTest() );
        list.add( new TCKValidationProvider() );
        return list;
      }
    };

    Configuration<?> configuration = Validation
View Full Code Here

  public void testByDefaultProviderUsesTheFirstProviderReturnedByValidationProviderResolver() {
    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( new TCKValidationProvider() );
        list.add( TestUtil.getValidationProviderUnderTest() );
        return list;
      }
    };
View Full Code Here

    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( TestUtil.getValidationProviderUnderTest() );
        list.add( new TCKValidationProvider() );
        return list;
      }
    };

    ValidatorFactory factory = Validation.byDefaultProvider()
View Full Code Here

  public void testCustomValidationProviderResolution() {
    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( new TCKValidationProvider() );
        return list;
      }
    };

    GenericBootstrap bootstrap = Validation.byDefaultProvider();
View Full Code Here

  public void testSpecificValidationProvider() {
    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( new TCKValidationProvider() );
        return list;
      }
    };

    // with resolver
View Full Code Here

    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( TestUtil.getValidationProviderUnderTest() );
        list.add( new TCKValidationProvider() );
        return list;
      }
    };

    Configuration<?> configuration = Validation
View Full Code Here

  public void testByDefaultProviderUsesTheFirstProviderReturnedByValidationProviderResolver() {
    ValidationProviderResolver resolver = new ValidationProviderResolver() {

      public List<ValidationProvider<?>> getValidationProviders() {
        List<ValidationProvider<?>> list = new ArrayList<ValidationProvider<?>>();
        list.add( new TCKValidationProvider() );
        list.add( TestUtil.getValidationProviderUnderTest() );
        return list;
      }
    };
View Full Code Here

TOP

Related Classes of org.hibernate.jsr303.tck.tests.bootstrap.CustomMessageInterpolatorTest$Person

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.