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
diff --git a/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java b/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java
index 6af4495..cf207a3 100644
--- a/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java
+++ b/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java
@@ -206,6 +206,17 @@
}
/**
+ * 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.
* @return false in case of execution failure. true in case of success.