Examples of CrossParameterDescriptor


Examples of javax.validation.metadata.CrossParameterDescriptor

        "notifyCustomer",
        Customer.class,
        String.class
    );
    assertNotNull( descriptor, "the specified method should be configured in xml" );
    CrossParameterDescriptor crossParameterDescriptor = descriptor.getCrossParameterDescriptor();
    assertTrue( crossParameterDescriptor.hasConstraints() );

    Set<ConstraintDescriptor<?>> constraintDescriptors = crossParameterDescriptor.getConstraintDescriptors();
    assertTrue( constraintDescriptors.size() == 1 );

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

Examples of javax.validation.metadata.CrossParameterDescriptor

    ConstructorDescriptor descriptor = TestUtil.getConstructorDescriptor(
        IgnoreAnnotations.class,
        String.class,
        String.class
    );
    CrossParameterDescriptor crossParameterDescriptor = descriptor.getCrossParameterDescriptor();
    assertFalse( crossParameterDescriptor.hasConstraints(), "Cross parameter constraints should be ignored." );

    ReturnValueDescriptor returnValueDescriptor = descriptor.getReturnValueDescriptor();
    assertFalse( returnValueDescriptor.hasConstraints(), "Return value constraints should be ignored." );

    ParameterDescriptor parameterDescriptor = descriptor.getParameterDescriptors().get( 0 );
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor

        IgnoreAnnotations.class,
        "foobar",
        String.class,
        String.class
    );
    CrossParameterDescriptor crossParameterDescriptor = descriptor.getCrossParameterDescriptor();
    assertFalse( crossParameterDescriptor.hasConstraints(), "Cross parameter constraints should be ignored." );

    ReturnValueDescriptor returnValueDescriptor = descriptor.getReturnValueDescriptor();
    assertFalse( returnValueDescriptor.hasConstraints(), "Return value constraints should be ignored." );

    ParameterDescriptor parameterDescriptor = descriptor.getParameterDescriptors().get( 0 );
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor

        IgnoreAnnotations.class,
        "foobar",
        String.class,
        String.class
    );
    CrossParameterDescriptor crossParameterDescriptor = descriptor.getCrossParameterDescriptor();
    assertFalse( crossParameterDescriptor.hasConstraints(), "Cross parameter constraints should be ignored." );

    ReturnValueDescriptor returnValueDescriptor = descriptor.getReturnValueDescriptor();
    assertFalse( returnValueDescriptor.hasConstraints(), "Return value constraints should be ignored." );
    assertTrue( returnValueDescriptor.getGroupConversions().isEmpty(), "Group conversions should be ignored" );
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor

        CustomerRepository.class,
        CustomerRepository.class,
        CustomerRepository.class
    );
    assertNotNull( descriptor, "the specified constructor should be configured in xml" );
    CrossParameterDescriptor crossParameterDescriptor = descriptor.getCrossParameterDescriptor();
    assertTrue( crossParameterDescriptor.hasConstraints() );

    Set<ConstraintDescriptor<?>> constraintDescriptors = crossParameterDescriptor.getConstraintDescriptors();
    assertTrue( constraintDescriptors.size() == 1 );

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

Examples of javax.validation.metadata.CrossParameterDescriptor

  @SpecAssertions({
      @SpecAssertion(section = "6.2", id = "a"),
      @SpecAssertion(section = "6.9", id = "a")
  })
  public void testGetElementClass() {
    CrossParameterDescriptor descriptor = Executables.crossParameterConstrainedMethod()
        .getCrossParameterDescriptor();
    assertEquals( descriptor.getElementClass(), Object[].class );
  }
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor

  }

  @Test
  @SpecAssertion(section = "6.2", id = "c")
  public void testHasConstraintsForMethod() {
    CrossParameterDescriptor descriptor = Executables.crossParameterConstrainedMethod()
        .getCrossParameterDescriptor();
    assertTrue( descriptor.hasConstraints(), "Should have constraints" );
  }
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor

    assertTrue( descriptor.hasConstraints(), "Should have constraints" );
  }

  @SpecAssertion(section = "6.2", id = "c")
  public void testHasConstraintsForUnconstrainedMethod() {
    CrossParameterDescriptor descriptor = Executables.unconstrainedMethod()
        .getCrossParameterDescriptor();
    assertFalse( descriptor.hasConstraints(), "Should have no constraints" );
  }
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor

  }

  @Test
  @SpecAssertion(section = "6.2", id = "c")
  public void testHasConstraintsForConstructor() {
    CrossParameterDescriptor descriptor = Executables.crossParameterConstrainedConstructor()
        .getCrossParameterDescriptor();
    assertTrue( descriptor.hasConstraints(), "Should have constraints" );
  }
View Full Code Here

Examples of javax.validation.metadata.CrossParameterDescriptor

  }

  @Test
  @SpecAssertion(section = "6.2", id = "c")
  public void testHasConstraintsForConstructorWithoutCrossParameterConstraints() {
    CrossParameterDescriptor descriptor = Executables.returnValueConstrainedConstructor()
        .getCrossParameterDescriptor();
    assertFalse( descriptor.hasConstraints(), "Should have no constraints" );
  }
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.