Give access to project name so that it can be used in junit adapter

git-svn-id: https://svn.apache.org/repos/asf/ant/antlibs/antunit/trunk@739564 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Scokart Gilles 2009-01-31 14:36:57 +00:00
parent 6fd044277d
commit cf53bf4bf5
1 changed files with 11 additions and 0 deletions

View File

@ -205,6 +205,17 @@ public class AntUnitScriptRunner {
return testTargets;
}
/**
* Provides the name of the active script.
* @pre isAvtive()
*/
public String getName() {
if (!isActive()) {
throw new AssertionError();
}
return getCurrentProject().getName();
}
/**
* Executes the suiteSetUp target if presents and report any execution error.
* Note that if the method return false, you are not allowed to run targets.