Consolidate names of methods that provide access to TypeInformation and Class on PersistentProperty.
We now name methods returning a TypeInformation<?> …TypeInformation() and ones that return Class<?> …Type(). In case of both flavors provided, overloads should move to the TypeInformation-based variant as the other one simply resolves ….getType() on the returned value. Closes: #2408 Original Pull Request: #2410
This commit is contained in:
committed by
Christoph Strobl
parent
7e1c3454b3
commit
e565c11dcc
@@ -113,7 +113,7 @@ class AbstractMappingContextIntegrationTests<T extends PersistentProperty<T>> {
|
||||
|
||||
when(prop.getTypeInformation()).thenReturn(owner.getTypeInformation());
|
||||
when(prop.getName()).thenReturn(property.getName());
|
||||
when(prop.getPersistentEntityTypes()).thenReturn(Collections.EMPTY_SET);
|
||||
when(prop.getPersistentEntityTypeInformation()).thenReturn(Collections.EMPTY_SET);
|
||||
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
|
||||
@@ -73,7 +73,7 @@ public class AbstractPersistentPropertyUnitTests {
|
||||
|
||||
@Test // DATACMNS-101
|
||||
void returnsNestedEntityTypeCorrectly() {
|
||||
assertThat(getProperty(TestClassComplex.class, "testClassSet").getPersistentEntityTypes()).isEmpty();
|
||||
assertThat(getProperty(TestClassComplex.class, "testClassSet").getPersistentEntityTypeInformation()).isEmpty();
|
||||
}
|
||||
|
||||
@Test // DATACMNS-132
|
||||
@@ -198,7 +198,7 @@ public class AbstractPersistentPropertyUnitTests {
|
||||
void doesNotConsiderPropertyWithTreeMapMapValueAnEntity() {
|
||||
|
||||
SamplePersistentProperty property = getProperty(TreeMapWrapper.class, "map");
|
||||
assertThat(property.getPersistentEntityTypes()).isEmpty();
|
||||
assertThat(property.getPersistentEntityTypeInformation()).isEmpty();
|
||||
assertThat(property.isEntity()).isFalse();
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ public class AbstractPersistentPropertyUnitTests {
|
||||
|
||||
assertThat(property.isAssociation()).isTrue();
|
||||
assertThat(property.getAssociationTargetType()).isEqualTo(JMoleculesAggregate.class);
|
||||
assertThat(property.getPersistentEntityTypes())
|
||||
assertThat(property.getPersistentEntityTypeInformation())
|
||||
.extracting(it -> it.getType())
|
||||
.containsExactly((Class) JMoleculesAggregate.class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user