From 435729812d5187f5b0a169f6cec2d5303400d856 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Fri, 4 Apr 2014 18:28:49 +0100 Subject: [PATCH] Add test for groovy-xml parsing --- spring-boot/pom.xml | 5 +++++ .../boot/BeanDefinitionLoaderTests.java | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/spring-boot/pom.xml b/spring-boot/pom.xml index fc1821d988..e42d4174e7 100644 --- a/spring-boot/pom.xml +++ b/spring-boot/pom.xml @@ -74,6 +74,11 @@ groovy true + + org.codehaus.groovy + groovy-xml + true + org.eclipse.jetty jetty-webapp diff --git a/spring-boot/src/test/java/org/springframework/boot/BeanDefinitionLoaderTests.java b/spring-boot/src/test/java/org/springframework/boot/BeanDefinitionLoaderTests.java index 99072b4faa..9534806029 100644 --- a/spring-boot/src/test/java/org/springframework/boot/BeanDefinitionLoaderTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/BeanDefinitionLoaderTests.java @@ -70,6 +70,17 @@ public class BeanDefinitionLoaderTests { } + @Test + public void loadGroovyResourceWithNamespace() throws Exception { + ClassPathResource resource = new ClassPathResource("sample-namespace.groovy", + getClass()); + BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry, resource); + int loaded = loader.load(); + assertThat(loaded, equalTo(1)); + assertTrue(this.registry.containsBean("myGroovyComponent")); + + } + @Test public void loadPackage() throws Exception { BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,