mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-03 13:39:34 +00:00
Improved Jaxb2Marshaller.supports()
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2990 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+13
@@ -236,6 +236,19 @@ public class Jaxb2MarshallerTests extends AbstractMarshallerTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void supportsXmlRootElement() throws Exception {
|
||||
marshaller = new Jaxb2Marshaller();
|
||||
marshaller.setClassesToBeBound(new Class[]{DummyRootElement.class, DummyType.class});
|
||||
marshaller.afterPropertiesSet();
|
||||
assertTrue("Jaxb2Marshaller does not support XmlRootElement class", marshaller.supports(DummyRootElement.class));
|
||||
assertTrue("Jaxb2Marshaller does not support XmlRootElement generic type", marshaller.supports((Type)DummyRootElement.class));
|
||||
|
||||
assertFalse("Jaxb2Marshaller supports DummyType class", marshaller.supports(DummyType.class));
|
||||
assertFalse("Jaxb2Marshaller supports DummyType type", marshaller.supports((Type)DummyType.class));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void marshalAttachments() throws Exception {
|
||||
marshaller = new Jaxb2Marshaller();
|
||||
|
||||
Reference in New Issue
Block a user