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

@@ -18,6 +18,8 @@ package org.springframework.data.rest.webmvc.support;
import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -52,7 +54,7 @@ public class PersistentEntityProjectorUnitTests {
ResourceMetadata metadata = mock(ResourceMetadata.class);
doReturn(metadata).when(mappings).getMetadataFor(Object.class);
doReturn(Excerpt.class).when(metadata).getExcerptProjection();
doReturn(Optional.of(Excerpt.class)).when(metadata).getExcerptProjection();
}
@Test // DATAREST-221