use of jakarta.validation.metadata.MethodDescriptor in project hibernate-validator by hibernate.
the class MethodDescriptorTest method testIsReturnValueConstrainedForCascadedMethod.
@Test
public void testIsReturnValueConstrainedForCascadedMethod() {
MethodDescriptor methodDescriptor = getMethodDescriptor(CustomerRepositoryExt.class, "foo");
assertThat(methodDescriptor.hasConstrainedReturnValue()).isTrue();
}
use of jakarta.validation.metadata.MethodDescriptor in project hibernate-validator by hibernate.
the class MethodDescriptorTest method testGetReturnValueDescriptorForVoidMethod.
@Test
public void testGetReturnValueDescriptorForVoidMethod() {
MethodDescriptor methodDescriptor = getMethodDescriptor(CustomerRepositoryExt.class, "saveCustomer", Customer.class);
assertThat(methodDescriptor.getReturnValueDescriptor()).isNotNull();
}
use of jakarta.validation.metadata.MethodDescriptor in project hibernate-validator by hibernate.
the class MethodDescriptorTest method testGetParameterConstraintsForParameterlessMethod.
@Test
public void testGetParameterConstraintsForParameterlessMethod() {
MethodDescriptor methodDescriptor = getMethodDescriptor(CustomerRepositoryExt.class, "baz");
List<ParameterDescriptor> parameterConstraints = methodDescriptor.getParameterDescriptors();
assertNotNull(parameterConstraints);
assertEquals(parameterConstraints.size(), 0);
}
use of jakarta.validation.metadata.MethodDescriptor in project hibernate-validator by hibernate.
the class MethodDescriptorTest method testAreParametersConstrainedForParameterCascadedMethod.
@Test
public void testAreParametersConstrainedForParameterCascadedMethod() {
MethodDescriptor methodDescriptor = getMethodDescriptor(CustomerRepositoryExt.class, "saveCustomer", Customer.class);
assertThat(methodDescriptor.hasConstrainedParameters()).isTrue();
}
use of jakarta.validation.metadata.MethodDescriptor in project hibernate-validator by hibernate.
the class BeanDescriptorTest method testGetConstraintsForMethod.
@Test
public void testGetConstraintsForMethod() throws Exception {
BeanDescriptor descriptor = getBeanDescriptor(CustomerRepository.class);
MethodDescriptor methodDescriptor = descriptor.getConstraintsForMethod("foo");
assertNotNull(methodDescriptor);
}
Aggregations