]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.agent/src/test/java/org/argeo/slc/ant/SlcAntTest.java
Introduce automated integration tests on the web app
[gpl/argeo-slc.git] / org.argeo.slc.agent / src / test / java / org / argeo / slc / ant / SlcAntTest.java
index 214bafc9e753ed688a56bbdbed0c208fab4308dc..9cfa214223575e109daae75322f7bad224f8868e 100644 (file)
@@ -2,26 +2,15 @@ package org.argeo.slc.ant;
 \r
 import java.io.File;\r
 \r
+import org.argeo.slc.ant.unit.MinimalAntClasspathTestCase;\r
 import org.argeo.slc.core.process.SlcExecution;\r
 import org.argeo.slc.unit.AbstractSpringTestCase;\r
 import org.springframework.core.io.FileSystemResource;\r
 \r
-public class SlcAntTest extends AbstractSpringTestCase {\r
+public class SlcAntTest extends MinimalAntClasspathTestCase {\r
        // private Log log = LogFactory.getLog(getClass());\r
 \r
        public void testSimpleRun() {\r
-               AntSlcApplication slcApp = new AntSlcApplication();\r
-               slcApp.setRootDir(new FileSystemResource(new File("src/test/resources")\r
-                               .getAbsolutePath()\r
-                               + File.separator));\r
-               slcApp.setWorkDir(new File(System.getProperty("java.io.tmpdir")));\r
-               slcApp.setParentContext(getContext());\r
-\r
-               SlcExecution slcExecution = new SlcExecution();\r
-               slcExecution.getAttributes().put(SlcAntConstants.EXECATTR_ANT_FILE,\r
-                               "/org/argeo/slc/ant/build.xml");\r
-\r
-               slcApp.execute(slcExecution, null, null);\r
+               execute("/org/argeo/slc/ant/build.xml");\r
        }\r
-\r
 }\r