1 package org
.argeo
.slc
.ant
.unit
;
5 import junit
.framework
.TestCase
;
7 import org
.argeo
.slc
.ant
.AntExecutionContext
;
8 import org
.argeo
.slc
.ant
.AntSlcRuntime
;
9 import org
.argeo
.slc
.runtime
.SlcExecutionOutput
;
11 public abstract class AntSlcApplicationTestCase
extends TestCase
implements
12 SlcExecutionOutput
<AntExecutionContext
> {
14 /** To be overriden */
15 public void postExecution(AntExecutionContext executionContext
) {
19 protected String
getRootDir() {
20 String rootDirPath
= System
.getProperty("slc.rootDir", "src/slc/root");
21 if(!new File(rootDirPath
).exists())
22 rootDirPath
= "src/main/slc/root";// try older convention
26 protected String
getAbsoluteScript(String relative
) {
27 return getRootDir() + '/' + relative
;
30 protected void execute(String relativeScript
) {
31 execute(relativeScript
, null);
34 protected void execute(String relativeScript
, String targets
) {
35 new AntSlcRuntime().executeScript(
36 getAbsoluteScript(relativeScript
), targets
, this);