DATACMNS-1106 - Removed deprecations in ProjectionFactory.

Removed the deprecated implementation of ResourceLoaderAware in favor of BeanClassLoaderAware. Removed deprecated ProjectionFactory.getInputProperties() in favor of ….getProjectionInformation(). Removed the Java conditional to add a MethodInterceptor for default methods. Adapted test cases.
This commit is contained in:
Oliver Gierke
2017-07-11 09:30:41 +02:00
parent 023a0b2a38
commit 8026e9ff72
6 changed files with 14 additions and 78 deletions

View File

@@ -49,11 +49,6 @@ public class ProxyProjectionFactoryUnitTests {
factory.createProjection(null, new Object());
}
@Test(expected = IllegalArgumentException.class) // DATACMNS-630
public void rejectsNullProjectionTypeForInputProperties() {
factory.getInputProperties(null);
}
@Test // DATACMNS-630
public void returnsNullForNullSource() {
assertThat(factory.createProjection(CustomerExcerpt.class, null)).isNull();

View File

@@ -17,6 +17,7 @@ package org.springframework.data.projection;
import static org.assertj.core.api.Assertions.*;
import java.beans.PropertyDescriptor;
import java.util.List;
import org.junit.Before;
@@ -58,9 +59,13 @@ public class SpelAwareProxyProjectionFactoryUnitTests {
@Test // DATACMNS-630
public void excludesAtValueAnnotatedMethodsForInputProperties() {
List<String> properties = factory.getInputProperties(CustomerExcerpt.class);
List<PropertyDescriptor> properties = factory //
.getProjectionInformation(CustomerExcerpt.class) //
.getInputProperties();
assertThat(properties).containsExactly("firstname");
assertThat(properties) //
.extracting(PropertyDescriptor::getName) //
.containsExactly("firstname");
}
@Test // DATACMNS-89