|
|
|
@ -163,6 +163,14 @@ public class Jaxb2MarshallerTests extends AbstractMarshallerTests { |
|
|
|
marshaller.afterPropertiesSet(); |
|
|
|
marshaller.afterPropertiesSet(); |
|
|
|
testSupports(); |
|
|
|
testSupports(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void supportsPackagesToScan() throws Exception { |
|
|
|
|
|
|
|
marshaller = new Jaxb2Marshaller(); |
|
|
|
|
|
|
|
marshaller.setPackagesToScan(new String[] {CONTEXT_PATH}); |
|
|
|
|
|
|
|
marshaller.afterPropertiesSet(); |
|
|
|
|
|
|
|
testSupports(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void testSupports() throws Exception { |
|
|
|
private void testSupports() throws Exception { |
|
|
|
assertTrue("Jaxb2Marshaller does not support Flights class", marshaller.supports(Flights.class)); |
|
|
|
assertTrue("Jaxb2Marshaller does not support Flights class", marshaller.supports(Flights.class)); |
|
|
|
@ -279,13 +287,6 @@ public class Jaxb2MarshallerTests extends AbstractMarshallerTests { |
|
|
|
assertTrue("No XML written", writer.toString().length() > 0); |
|
|
|
assertTrue("No XML written", writer.toString().length() > 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
|
|
public void supportsPackagesToScan() throws Exception { |
|
|
|
|
|
|
|
marshaller = new Jaxb2Marshaller(); |
|
|
|
|
|
|
|
marshaller.setPackagesToScan(new String[] {CONTEXT_PATH}); |
|
|
|
|
|
|
|
marshaller.afterPropertiesSet(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@XmlRootElement |
|
|
|
@XmlRootElement |
|
|
|
public static class DummyRootElement { |
|
|
|
public static class DummyRootElement { |
|
|
|
|
|
|
|
|
|
|
|
|