File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
org.springframework.oxm/src/test/java/org/springframework/oxm/jaxb Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,19 @@ public boolean matches(Method method) {
236
236
});
237
237
}
238
238
239
+ @ Test
240
+ public void supportsXmlRootElement () throws Exception {
241
+ marshaller = new Jaxb2Marshaller ();
242
+ marshaller .setClassesToBeBound (new Class []{DummyRootElement .class , DummyType .class });
243
+ marshaller .afterPropertiesSet ();
244
+ assertTrue ("Jaxb2Marshaller does not support XmlRootElement class" , marshaller .supports (DummyRootElement .class ));
245
+ assertTrue ("Jaxb2Marshaller does not support XmlRootElement generic type" , marshaller .supports ((Type )DummyRootElement .class ));
246
+
247
+ assertFalse ("Jaxb2Marshaller supports DummyType class" , marshaller .supports (DummyType .class ));
248
+ assertFalse ("Jaxb2Marshaller supports DummyType type" , marshaller .supports ((Type )DummyType .class ));
249
+ }
250
+
251
+
239
252
@ Test
240
253
public void marshalAttachments () throws Exception {
241
254
marshaller = new Jaxb2Marshaller ();
You can’t perform that action at this time.
0 commit comments