mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Add test for groovy-xml parsing
This commit is contained in:
parent
430fb51ca4
commit
435729812d
@ -74,6 +74,11 @@
|
|||||||
<artifactId>groovy</artifactId>
|
<artifactId>groovy</artifactId>
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.groovy</groupId>
|
||||||
|
<artifactId>groovy-xml</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.eclipse.jetty</groupId>
|
<groupId>org.eclipse.jetty</groupId>
|
||||||
<artifactId>jetty-webapp</artifactId>
|
<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
|
@Test
|
||||||
public void loadPackage() throws Exception {
|
public void loadPackage() throws Exception {
|
||||||
BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
|
BeanDefinitionLoader loader = new BeanDefinitionLoader(this.registry,
|
||||||
|
Loading…
Reference in New Issue
Block a user