Package javax.validation.metadata

Examples of javax.validation.metadata.MethodDescriptor


  }

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


  }

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

  }

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

  }

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

  }

  @Test
  @SpecAssertion(section = "6.7", id = "d")
  public void testGetReturnValueDescriptorForMethod() {
    MethodDescriptor descriptor = Executables.returnValueConstrainedMethod();
    assertNotNull(
        descriptor.getReturnValueDescriptor(),
        "Return value descriptor should not be null"
    );
  }
View Full Code Here

  }

  @Test
  @SpecAssertion(section = "6.7", id = "d")
  public void testGetUnconstrainedReturnValueDescriptorForMethod() {
    MethodDescriptor descriptor = Executables.cascadedParameterMethod();
    assertNotNull(
        descriptor.getReturnValueDescriptor(),
        "Return value descriptor should not be null"
    );
  }
View Full Code Here

  }

  @Test
  @SpecAssertion(section = "6.7", id = "d")
  public void testReturnValueDescriptorForVoidMethod() {
    MethodDescriptor descriptor = Executables.parameterConstrainedMethod();
    assertNotNull(
        descriptor.getReturnValueDescriptor(),
        "Return value descriptor should not be null"
    );
  }
View Full Code Here

  }

  @Test
  @SpecAssertion(section = "6.7", id = "e")
  public void testAreParametersConstrainedForConstrainedMethod() {
    MethodDescriptor descriptor = Executables.parameterConstrainedMethod();
    assertTrue(
        descriptor.hasConstrainedParameters(),
        "Should be constrained on parameters"
    );
  }
View Full Code Here

  }

  @Test
  @SpecAssertion(section = "6.7", id = "e")
  public void testAreParametersConstrainedForCascadedMethod() {
    MethodDescriptor descriptor = Executables.cascadedParameterMethod();
    assertTrue(
        descriptor.hasConstrainedParameters(),
        "Should be constrained on parameters"
    );
  }
View Full Code Here


  @Test
  @SpecAssertion(section = "6.7", id = "e")
  public void testAreParametersConstrainedForCrossParameterConstrainedMethod() {
    MethodDescriptor descriptor = Executables.crossParameterConstrainedMethod();
    assertTrue(
        descriptor.hasConstrainedParameters(),
        "Should be constrained on parameters"
    );
  }
View Full Code Here

TOP

Related Classes of javax.validation.metadata.MethodDescriptor

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.