diff --git a/src/test/java/org/springframework/data/web/config/PageableResourcesAssemblerIntegrationTests.java b/src/test/java/org/springframework/data/web/config/PageableResourcesAssemblerIntegrationTests.java index 1f6083e36..28e58fe1e 100644 --- a/src/test/java/org/springframework/data/web/config/PageableResourcesAssemblerIntegrationTests.java +++ b/src/test/java/org/springframework/data/web/config/PageableResourcesAssemblerIntegrationTests.java @@ -26,6 +26,7 @@ import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.SpringVersion; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; @@ -79,6 +80,28 @@ public class PageableResourcesAssemblerIntegrationTests { assertThat(resources.getLink(Link.REL_SELF), is(notNullValue())); } + /** + * @see DATACMNS-471 + */ + @Test + public void setsUpPagedResourcesAssemblerFromManualXmlConfig() { + + ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("manual.xml", getClass()); + assertThat(context.getBean(PagedResourcesAssembler.class), is(notNullValue())); + context.close(); + } + + /** + * @see DATACMNS-471 + */ + @Test + public void setsUpPagedResourcesAssemblerFromJavaConfigXmlConfig() { + + ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("via-config-class.xml", getClass()); + assertThat(context.getBean(PagedResourcesAssembler.class), is(notNullValue())); + context.close(); + } + @Controller static class SampleController { diff --git a/src/test/resources/org/springframework/data/web/config/manual.xml b/src/test/resources/org/springframework/data/web/config/manual.xml new file mode 100644 index 000000000..32b09e546 --- /dev/null +++ b/src/test/resources/org/springframework/data/web/config/manual.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + diff --git a/src/test/resources/org/springframework/data/web/config/via-config-class.xml b/src/test/resources/org/springframework/data/web/config/via-config-class.xml new file mode 100644 index 000000000..8384e7dc4 --- /dev/null +++ b/src/test/resources/org/springframework/data/web/config/via-config-class.xml @@ -0,0 +1,12 @@ + + + + + + + +