Examples of findConstraints()


Examples of javax.validation.metadata.CrossParameterDescriptor.findConstraints()

  })
  public void testFindConstraintsForMethodWithoutCrossParameterConstraints() {
    CrossParameterDescriptor descriptor = Executables.returnValueConstrainedMethod()
        .getCrossParameterDescriptor();

    Set<ConstraintDescriptor<?>> constraints = descriptor.findConstraints().getConstraintDescriptors();
    assertEquals( constraints.size(), 0, "Should have no constraints" );
  }

  @Test
  @SpecAssertions({
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor.findConstraints()

  })
  public void testFindConstraintsForConstructor() {
    CrossParameterDescriptor descriptor = Executables.crossParameterConstrainedConstructor()
        .getCrossParameterDescriptor();

    Set<ConstraintDescriptor<?>> constraints = descriptor.findConstraints().getConstraintDescriptors();
    assertEquals( constraints.size(), 1, "Should have constraints" );

    ConstraintDescriptor<?> constraint = constraints.iterator().next();
    assertEquals(
        constraint.getAnnotation().annotationType(),
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor.findConstraints()

  })
  public void testFindConstraintsForConstructorWithoutCrossParameterConstraints() {
    CrossParameterDescriptor descriptor = Executables.returnValueConstrainedConstructor()
        .getCrossParameterDescriptor();

    Set<ConstraintDescriptor<?>> constraints = descriptor.findConstraints().getConstraintDescriptors();
    assertEquals( constraints.size(), 0, "Should have no constraints" );
  }
}
View Full Code Here

Examples of javax.validation.metadata.MethodDescriptor.findConstraints()

      @SpecAssertion(section = "6.7", id = "g")
  })
  public void testFindConstraintsForMethod() {
    MethodDescriptor parameterConstrainedDescriptor = Executables.parameterConstrainedMethod();
    assertTrue(
        parameterConstrainedDescriptor.findConstraints()
            .getConstraintDescriptors()
            .isEmpty(),
        "Should have no constraints"
    );
View Full Code Here

Examples of javax.validation.metadata.MethodDescriptor.findConstraints()

        "Should have no constraints"
    );

    MethodDescriptor returnValueConstrainedDescriptor = Executables.returnValueConstrainedMethod();
    assertTrue(
        returnValueConstrainedDescriptor.findConstraints()
            .getConstraintDescriptors()
            .isEmpty(),
        "Should have no constraints"
    );
    MethodDescriptor crossParameterConstrainedDescriptor = Executables.crossParameterConstrainedMethod();
View Full Code Here

Examples of javax.validation.metadata.MethodDescriptor.findConstraints()

            .isEmpty(),
        "Should have no constraints"
    );
    MethodDescriptor crossParameterConstrainedDescriptor = Executables.crossParameterConstrainedMethod();
    assertTrue(
        crossParameterConstrainedDescriptor.findConstraints()
            .getConstraintDescriptors()
            .isEmpty(),
        "Should have no constraints"
    );
  }
View Full Code Here

Examples of javax.validation.metadata.MethodDescriptor.findConstraints()

      @SpecAssertion(section = "6.7", id = "g")
  })
  public void testFindConstraintsForMethodLookingAt() {
    MethodDescriptor crossParameterConstrainedDescriptor = Executables.methodOverridingCrossParameterConstrainedMethod();
    assertEquals(
        crossParameterConstrainedDescriptor.findConstraints()
            .lookingAt( Scope.LOCAL_ELEMENT )
            .getConstraintDescriptors()
            .size(),
        0,
        "Should have no local constraints"
View Full Code Here

Examples of javax.validation.metadata.MethodDescriptor.findConstraints()

        0,
        "Should have no local constraints"
    );

    assertTrue(
        crossParameterConstrainedDescriptor.findConstraints().lookingAt( Scope.HIERARCHY )
            .getConstraintDescriptors()
            .isEmpty(),
        "Should have no hierarchy constraints"
    );
  }
View Full Code Here

Examples of javax.validation.metadata.MethodDescriptor.findConstraints()

      @SpecAssertion(section = "6.7", id = "g")
  })
  public void testFindConstraintsForMethodDefinedOnSuperTypeLookingAt() {
    MethodDescriptor crossParameterConstrainedDescriptor = Executables.crossParameterConstrainedMethodFromSuperType();
    assertEquals(
        crossParameterConstrainedDescriptor.findConstraints()
            .lookingAt( Scope.LOCAL_ELEMENT )
            .getConstraintDescriptors()
            .size(),
        0,
        "Should have no local constraints"
View Full Code Here

Examples of javax.validation.metadata.MethodDescriptor.findConstraints()

        0,
        "Should have no local constraints"
    );

    assertTrue(
        crossParameterConstrainedDescriptor.findConstraints().lookingAt( Scope.HIERARCHY )
            .getConstraintDescriptors()
            .isEmpty(),
        "Should have no hierarchy constraint"
    );
  }
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.