use of org.springframework.data.util.AnnotatedTypeScanner in project spring-data-commons by spring-projects.
the class TypeAliasUnitTests method scanningforAtPersistentFindsTypeAliasAnnotatedTypes.
// DATACMNS-547
@Test
@SuppressWarnings("unchecked")
public void scanningforAtPersistentFindsTypeAliasAnnotatedTypes() {
AnnotatedTypeScanner scanner = new AnnotatedTypeScanner(Persistent.class);
Set<Class<?>> types = scanner.findTypes(getClass().getPackage().getName());
assertThat(types).containsExactlyInAnyOrder(SampleType.class, TypeAlias.class);
}
use of org.springframework.data.util.AnnotatedTypeScanner in project spring-data-commons by spring-projects.
the class MappingContextTypeInformationMapperUnitTests method createsTypeMapperForGenericTypesWithDifferentBindings.
// DATACMNS-485
@Test
@SuppressWarnings("unchecked")
public void createsTypeMapperForGenericTypesWithDifferentBindings() {
AnnotatedTypeScanner scanner = new AnnotatedTypeScanner(TypeAlias.class);
SampleMappingContext context = new SampleMappingContext();
context.setInitialEntitySet(scanner.findTypes(getClass().getPackage().getName()));
context.initialize();
new MappingContextTypeInformationMapper(context);
}
Aggregations