use of jakarta.validation.metadata.ConstructorDescriptor in project beanvalidation-tck by eclipse-ee4j.
the class ExecutableDescriptorTest method testGetParameterDescriptorsForParameterlessConstructor.
@Test
@SpecAssertion(section = Sections.CONSTRAINTMETADATA_EXECUTABLEDESCRIPTOR, 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");
}
use of jakarta.validation.metadata.ConstructorDescriptor in project beanvalidation-tck by eclipse-ee4j.
the class ExecutableDescriptorTest method testAreParametersConstrainedForCrossParameterConstrainedConstructor.
@Test
@SpecAssertion(section = Sections.CONSTRAINTMETADATA_EXECUTABLEDESCRIPTOR, id = "e")
public void testAreParametersConstrainedForCrossParameterConstrainedConstructor() {
ConstructorDescriptor descriptor = Executables.crossParameterConstrainedConstructor();
assertTrue(descriptor.hasConstrainedParameters(), "Should be constrained on parameters");
}
use of jakarta.validation.metadata.ConstructorDescriptor in project beanvalidation-tck by eclipse-ee4j.
the class ExecutableDescriptorTest method testGetUnconstrainedReturnValueDescriptorForConstructor.
@Test
@SpecAssertion(section = Sections.CONSTRAINTMETADATA_EXECUTABLEDESCRIPTOR, id = "d")
public void testGetUnconstrainedReturnValueDescriptorForConstructor() {
ConstructorDescriptor descriptor = Executables.cascadedParameterConstructor();
assertNotNull(descriptor.getReturnValueDescriptor(), "Return value descriptor should not be null");
}
use of jakarta.validation.metadata.ConstructorDescriptor in project beanvalidation-tck by eclipse-ee4j.
the class ExecutableDescriptorTest method testGetCrossParameterDescriptorForConstructor.
@Test
@SpecAssertion(section = Sections.CONSTRAINTMETADATA_EXECUTABLEDESCRIPTOR, id = "c")
public void testGetCrossParameterDescriptorForConstructor() {
ConstructorDescriptor descriptor = Executables.crossParameterConstrainedConstructor();
assertNotNull(descriptor.getCrossParameterDescriptor(), "Cross-parameter descriptor should not be null");
}
use of jakarta.validation.metadata.ConstructorDescriptor in project beanvalidation-tck by eclipse-ee4j.
the class BeanDescriptorTest method testGetConstraintsForUnconstrainedConstructor.
@Test
@SpecAssertion(section = Sections.CONSTRAINTMETADATA_BEANDESCRIPTOR, id = "g")
public void testGetConstraintsForUnconstrainedConstructor() {
ConstructorDescriptor constructorDescriptor = Executables.unconstrainedConstructor();
assertNull(constructorDescriptor, "Descriptor should be null");
}
Aggregations