Examples of ConstructorDescriptor


Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "h")
  public void testConstructorDescriptorCanBeRetrievedAlsoIfValidateExecutableIsSetToNONEOnTypeLevel() {
    ConstructorDescriptor descriptor = getConstructorDescriptor(
        OrderLine.class,
        String.class
    );

    assertNotNull( descriptor );
    assertEquals( descriptor.getName(), "OrderLine" );
    assertEquals( descriptor.getParameterDescriptors().get( 0 ).getConstraintDescriptors().size(), 1 );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "h")
  public void testConstructorDescriptorCanBeRetrievedAlsoIfValidateExecutableIsSetToNONEOnConstructorLevel() {
    ConstructorDescriptor descriptor = getConstructorDescriptor(
        Item.class,
        String.class
    );

    assertNotNull( descriptor );
    assertEquals( descriptor.getName(), "Item" );
    assertEquals( descriptor.getParameterDescriptors().get( 0 ).getConstraintDescriptors().size(), 1 );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.2", id = "a")
  public void testGetElementClassForConstructor() {
    ConstructorDescriptor descriptor = Executables.returnValueConstrainedConstructor();
    assertEquals( descriptor.getElementClass(), CustomerService.class );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "a")
  public void testGetNameForConstructor() {
    ConstructorDescriptor descriptor = Executables.parameterConstrainedConstructor();
    assertEquals( descriptor.getName(), "CustomerService" );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "b")
  public void testGetParameterDescriptorsForConstructor() {
    ConstructorDescriptor descriptor = Executables.parameterConstrainedConstructor();
    assertEquals(
        descriptor.getParameterDescriptors().size(),
        2,
        "Size of parameter descriptor list doesn't match constructor parameter count"
    );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "b")
  public void testGetParameterDescriptorsForConstructorOfInnerClass() {
    ConstructorDescriptor descriptor = Executables.parameterConstrainedConstructorOfInnerClass();
    assertEquals(
        descriptor.getParameterDescriptors().size(),
        2,
        "Size of parameter descriptor list doesn't match constructor parameter count"
    );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "b")
  public void testGetParameterDescriptorsForParameterlessConstructor() {
    ConstructorDescriptor descriptor = Executables.returnValueConstrainedConstructor();
    assertEquals(
        descriptor.getParameterDescriptors().size(),
        0,
        "Size of parameter descriptor list doesn't match constructor parameter count"
    );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "c")
  public void testGetCrossParameterDescriptorForConstructor() {
    ConstructorDescriptor descriptor = Executables.crossParameterConstrainedConstructor();
    assertNotNull(
        descriptor.getCrossParameterDescriptor(),
        "Cross-parameter descriptor should not be null"
    );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "c")
  public void testGetCrossParameterDescriptorForConstructorWithoutCrossParameterConstraints() {
    ConstructorDescriptor descriptor = Executables.returnValueConstrainedConstructor();
    assertNotNull(
        descriptor.getCrossParameterDescriptor(),
        "Cross-parameter descriptor should not be null"
    );
  }
View Full Code Here

Examples of javax.validation.metadata.ConstructorDescriptor

  }

  @Test
  @SpecAssertion(section = "6.7", id = "d")
  public void testGetReturnValueDescriptorForConstructor() {
    ConstructorDescriptor descriptor = Executables.returnValueConstrainedConstructor();
    assertNotNull(
        descriptor.getReturnValueDescriptor(),
        "Return value descriptor should not be null"
    );
  }
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.