]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/test/java/org/argeo/slc/core/process/SlcExecutionCastorTest.java
Create separate Hibernate project
[gpl/argeo-slc.git] / org.argeo.slc.core / src / test / java / org / argeo / slc / core / process / SlcExecutionCastorTest.java
index 062fbb003e163d9d559b12f4d9749b264dbf073a..8ede3a234ba6ef628e92cea3ffc1e972dcfa8569 100644 (file)
@@ -17,11 +17,13 @@ import org.argeo.slc.msg.process.SlcExecutionRequest;
 import org.argeo.slc.msg.process.SlcExecutionStepsRequest;\r
 import org.argeo.slc.unit.AbstractSpringTestCase;\r
 import org.argeo.slc.unit.UnitXmlUtils;\r
+import org.argeo.slc.unit.process.SlcExecutionTestUtils;\r
 \r
 import org.springframework.oxm.Marshaller;\r
 import org.springframework.oxm.Unmarshaller;\r
 import org.springframework.xml.transform.StringResult;\r
 import org.springframework.xml.transform.StringSource;\r
+import org.springframework.xml.validation.XmlValidator;\r
 import org.springframework.xml.xsd.XsdSchema;\r
 \r
 public class SlcExecutionCastorTest extends AbstractSpringTestCase {\r
@@ -32,8 +34,8 @@ public class SlcExecutionCastorTest extends AbstractSpringTestCase {
 \r
        @Override\r
        public void setUp() {\r
-               marshaller = getBean("marshaller");\r
-               unmarshaller = getBean("marshaller");\r
+               marshaller = getBean(Marshaller.class);\r
+               unmarshaller = getBean(Unmarshaller.class);\r
        }\r
 \r
        public void testMarshalling() throws Exception {\r
@@ -97,9 +99,8 @@ public class SlcExecutionCastorTest extends AbstractSpringTestCase {
                marshaller.marshal(obj, xml);\r
                log.info("Marshalled object: " + xml);\r
 \r
-               XsdSchema schema = getBean("schema");\r
-               UnitXmlUtils.assertXsdSchemaValidation(schema, new StringSource(xml\r
-                               .toString()));\r
+               UnitXmlUtils.assertXmlValidation(getBean(XmlValidator.class),\r
+                               new StringSource(xml.toString()));\r
 \r
                return xml.toString();\r
        }\r