]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/test/java/org/argeo/slc/core/test/tree/TreeTestResultCastorTest.java
Update XML formats
[gpl/argeo-slc.git] / org.argeo.slc.core / src / test / java / org / argeo / slc / core / test / tree / TreeTestResultCastorTest.java
index 974ebce6cc8261a0ac387aca6de02bc96f25bb6e..8479c95ca5a91622675aab7e9d2989304e28a669 100644 (file)
@@ -4,6 +4,7 @@ import org.springframework.oxm.Marshaller;
 import org.springframework.oxm.Unmarshaller;\r
 import org.springframework.xml.transform.StringResult;\r
 import org.springframework.xml.transform.StringSource;\r
+import org.springframework.xml.xsd.XsdSchema;\r
 \r
 import org.apache.commons.logging.Log;\r
 import org.apache.commons.logging.LogFactory;\r
@@ -11,6 +12,7 @@ import org.apache.commons.logging.LogFactory;
 import static org.argeo.slc.core.test.tree.TreeTestResultTestUtils.createCompleteTreeTestResult;\r
 \r
 import org.argeo.slc.unit.AbstractSpringTestCase;\r
+import org.argeo.slc.unit.UnitXmlUtils;\r
 import org.argeo.slc.unit.test.tree.UnitTestTreeUtil;\r
 \r
 public class TreeTestResultCastorTest extends AbstractSpringTestCase {\r
@@ -27,6 +29,10 @@ public class TreeTestResultCastorTest extends AbstractSpringTestCase {
 \r
                log.info("Marshalled TreeTestResult: " + xml);\r
 \r
+               XsdSchema schema = getBean("schema");\r
+               UnitXmlUtils.assertXsdSchemaValidation(schema, new StringSource(xml\r
+                               .toString()));\r
+\r
                TreeTestResult ttrUnm = (TreeTestResult) unmarshaller\r
                                .unmarshal(new StringSource(xml.toString()));\r
 \r