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:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user