Commit 43572981 authored by Dave Syer's avatar Dave Syer

Add test for groovy-xml parsing

parent 430fb51c
......@@ -74,6 +74,11 @@
<artifactId>groovy</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-xml</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId>
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment