1 package org
.argeo
.slc
.ant
.unit
;
3 import junit
.framework
.TestCase
;
5 import org
.apache
.tools
.ant
.launch
.AntMain
;
6 import org
.argeo
.slc
.ant
.AntExecutionContext
;
7 import org
.argeo
.slc
.cli
.DefaultSlcRuntime
;
8 import org
.argeo
.slc
.runtime
.SlcExecutionContext
;
9 import org
.argeo
.slc
.runtime
.SlcExecutionOutput
;
11 public abstract class SlcAntAppliTestCase
extends TestCase
implements
12 SlcExecutionOutput
<AntExecutionContext
> {
14 /** To be overriden */
15 public void postExecution(AntExecutionContext executionContext
) {
19 protected String
getRootDir() {
20 return System
.getProperty("slc.rootDir", "src/main/slc/root");
23 protected String
getAbsoluteScript(String relative
) {
24 return getRootDir() + '/' + relative
;
27 protected void execute(String relativeScript
) {
28 execute(relativeScript
, null);
31 protected void execute(String relativeScript
, String targets
) {
32 new DefaultSlcRuntime().executeScript(
33 getAbsoluteScript(relativeScript
), targets
, this);