DATAREST-1403 - CollectionResourceMapping.getExcerptProjection() now returns Optional.

This commit is contained in:
Oliver Drotbohm
2019-06-26 16:34:41 +02:00
parent 2d994c7076
commit 556e918ef7
8 changed files with 38 additions and 19 deletions

View File

@@ -121,8 +121,8 @@ public class RepositoryCollectionResourceMappingUnitTests {
@Test // DATAREST-1401
public void exposesProjectionTypeIfConfigured() {
assertThat(getResourceMappingFor(WithProjection.class).getExcerptProjection()).isEqualTo(Object.class);
assertThat(getResourceMappingFor(WithoutProjection.class).getExcerptProjection()).isNull();
assertThat(getResourceMappingFor(WithProjection.class).getExcerptProjection()).hasValue(Object.class);
assertThat(getResourceMappingFor(WithoutProjection.class).getExcerptProjection()).isEmpty();
}
private static CollectionResourceMapping getResourceMappingFor(Class<?> repositoryInterface) {