svn commit: r936162 - in /camel/trunk/components/camel-test/src/main/java/org/apache/camel/test: CamelTestSupport.java TestSupport.java junit4/CamelTestSupport.java junit4/TestSupport.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r936162 - in /camel/trunk/components/camel-test/src/main/java/org/apache/camel/test: CamelTestSupport.java TestSupport.java junit4/CamelTestSupport.java junit4/TestSupport.java

davsclaus-2
Author: davsclaus
Date: Wed Apr 21 05:47:03 2010
New Revision: 936162

URL: http://svn.apache.org/viewvc?rev=936162&view=rev
Log:
Fixed get test name on junit 4.x

Modified:
    camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
    camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
    camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
    camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java?rev=936162&r1=936161&r2=936162&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java (original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java Wed Apr 21 05:47:03 2010
@@ -80,7 +80,7 @@ public abstract class CamelTestSupport e
     @Override
     protected void setUp() throws Exception {
         log.info("********************************************************************************");
-        log.info("Testing: " + getName() + "(" + getClass().getName() + ")");
+        log.info("Testing: " + getTestMethodName() + "(" + getClass().getName() + ")");
         log.info("********************************************************************************");
 
         log.debug("setUp test");

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java?rev=936162&r1=936161&r2=936162&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java (original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/TestSupport.java Wed Apr 21 05:47:03 2010
@@ -471,4 +471,13 @@ public abstract class TestSupport extend
         return javaVendor.indexOf(vendor.toLowerCase(Locale.US)) > -1;
     }
 
+    /**
+     * Gets the current test method name
+     *
+     * @return the method name
+     */
+    public String getTestMethodName() {
+        return getName();
+    }
+
 }

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java?rev=936162&r1=936161&r2=936162&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java (original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java Wed Apr 21 05:47:03 2010
@@ -82,7 +82,7 @@ public abstract class CamelTestSupport e
     @Before
     public void setUp() throws Exception {
         log.info("********************************************************************************");
-        log.info("Testing: " + getName() + "(" + getClass().getName() + ")");
+        log.info("Testing: " + getTestMethodName() + "(" + getClass().getName() + ")");
         log.info("********************************************************************************");
 
         log.debug("setUp test");

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java?rev=936162&r1=936161&r2=936162&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java (original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java Wed Apr 21 05:47:03 2010
@@ -21,7 +21,6 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Locale;
 
-import junit.framework.TestCase;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Channel;
 import org.apache.camel.Endpoint;
@@ -49,7 +48,7 @@ import org.junit.Assert;
  *
  * @version $Revision$
  */
-public abstract class TestSupport extends TestCase {
+public abstract class TestSupport extends Assert {
     private static final Log LOG = LogFactory.getLog(TestSupport.class);    
     protected transient Log log = LogFactory.getLog(getClass());    
     
@@ -471,4 +470,13 @@ public abstract class TestSupport extend
         return javaVendor.indexOf(vendor.toLowerCase(Locale.US)) > -1;
     }
 
+    /**
+     * Gets the current test method name
+     *
+     * @return the method name
+     */
+    public static String getTestMethodName() {
+        return "";
+    }
+
 }