You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gs...@apache.org on 2009/01/31 15:36:57 UTC
svn commit: r739564 -
/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java
Author: gscokart
Date: Sat Jan 31 14:36:57 2009
New Revision: 739564
URL: http://svn.apache.org/viewvc?rev=739564&view=rev
Log:
Give access to project name so that it can be used in junit adapter
Modified:
ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java
Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java?rev=739564&r1=739563&r2=739564&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnitScriptRunner.java Sat Jan 31 14:36:57 2009
@@ -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.