Package javax.validation.metadata

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


        "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

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

      @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

        0,
        "Should have no local constraints"
    );

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

      @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

        0,
        "Should have no local constraints"
    );

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

        DateMidnight.class,
        DateMidnight.class
    );

    assertTrue(
        descriptor.findConstraints()
            .getConstraintDescriptors()
            .isEmpty()
    );
  }
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.