DATACMNS-867 - Let lookups for a property's component and map value type use Optional.

This commit is contained in:
Oliver Gierke
2017-03-21 18:56:41 +01:00
parent 1c45fcfcdc
commit 7c33bcf98a
4 changed files with 14 additions and 13 deletions

View File

@@ -50,7 +50,8 @@ public class MappingMetadataTests {
PersistentEntity<?, SamplePersistentProperty> person = ctx.getRequiredPersistentEntity(PersonWithChildren.class);
person.doWithAssociations((AssociationHandler<SamplePersistentProperty>) association -> assertThat(
association.getInverse().getComponentType()).isEqualTo(Child.class));
person.doWithAssociations((AssociationHandler<SamplePersistentProperty>) association -> {
assertThat(association.getInverse().getComponentType()).hasValue(Child.class);
});
}
}

View File

@@ -61,7 +61,7 @@ public class AbstractPersistentPropertyUnitTests {
@Test // DATACMNS-68
public void discoversComponentTypeCorrectly() throws Exception {
assertThat(getProperty(TestClassComplex.class, "testClassSet").getComponentType()).isEqualTo(Object.class);
assertThat(getProperty(TestClassComplex.class, "testClassSet").getComponentType()).hasValue(Object.class);
}
@Test // DATACMNS-101