Search in sources :

Example 1 with CustomerRepositoryExt

use of org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt in project hibernate-validator by hibernate.

the class ExecutableMetaDataTest method getKindForConstructor.

@Test
public void getKindForConstructor() throws Exception {
    Constructor<CustomerRepositoryExt> constructor = CustomerRepositoryExt.class.getConstructor(String.class);
    ExecutableMetaData constructorMetaData = beanMetaData.getMetaDataFor(constructor).get();
    assertThat(constructorMetaData.getKind()).isEqualTo(ElementKind.CONSTRUCTOR);
}
Also used : ExecutableMetaData(org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData) CustomerRepositoryExt(org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt) Test(org.testng.annotations.Test)

Example 2 with CustomerRepositoryExt

use of org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt in project hibernate-validator by hibernate.

the class ExecutableMetaDataTest method getIdentifierForConstructor.

@Test
public void getIdentifierForConstructor() throws Exception {
    Constructor<CustomerRepositoryExt> constructor = CustomerRepositoryExt.class.getConstructor(String.class);
    ExecutableMetaData constructorMetaData = beanMetaData.getMetaDataFor(constructor).get();
    assertThat(constructorMetaData.getSignatures()).containsOnly(new Signature("CustomerRepositoryExt", String.class));
}
Also used : Signature(org.hibernate.validator.internal.properties.Signature) ExecutableMetaData(org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData) CustomerRepositoryExt(org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt) Test(org.testng.annotations.Test)

Example 3 with CustomerRepositoryExt

use of org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt in project hibernate-validator by hibernate.

the class ExecutableMetaDataTest method getNameOfConstructor.

@Test
public void getNameOfConstructor() throws Exception {
    Constructor<CustomerRepositoryExt> constructor = CustomerRepositoryExt.class.getConstructor(String.class);
    ExecutableMetaData constructorMetaData = beanMetaData.getMetaDataFor(constructor).get();
    assertThat(constructorMetaData.getName()).isEqualTo(constructor.getDeclaringClass().getSimpleName());
}
Also used : ExecutableMetaData(org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData) CustomerRepositoryExt(org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt) Test(org.testng.annotations.Test)

Example 4 with CustomerRepositoryExt

use of org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt in project hibernate-validator by hibernate.

the class ExecutableMetaDataTest method getTypeForConstructor.

@Test
public void getTypeForConstructor() throws Exception {
    Constructor<CustomerRepositoryExt> constructor = CustomerRepositoryExt.class.getConstructor(String.class);
    ExecutableMetaData constructorMetaData = beanMetaData.getMetaDataFor(constructor).get();
    assertThat(constructorMetaData.getType()).isEqualTo(CustomerRepositoryExt.class);
}
Also used : ExecutableMetaData(org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData) CustomerRepositoryExt(org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt) Test(org.testng.annotations.Test)

Aggregations

ExecutableMetaData (org.hibernate.validator.internal.metadata.aggregated.ExecutableMetaData)4 CustomerRepositoryExt (org.hibernate.validator.test.internal.metadata.CustomerRepositoryExt)4 Test (org.testng.annotations.Test)4 Signature (org.hibernate.validator.internal.properties.Signature)1