override runTests vs run(TestResult) so test counting works as expected


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@984448 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/SigilTestAdapter.java b/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/SigilTestAdapter.java
index 8137759..fcb51b8 100644
--- a/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/SigilTestAdapter.java
+++ b/sigil/gogo/junit/src/org/apache/felix/sigil/gogo/junit/SigilTestAdapter.java
@@ -22,10 +22,8 @@
 import java.lang.reflect.InvocationTargetException;
 import java.util.Arrays;
 
-import junit.framework.AssertionFailedError;
 import junit.framework.Test;
 import junit.framework.TestCase;
-import junit.framework.TestResult;
 import junit.framework.TestSuite;
 
 import org.osgi.service.command.CommandSession;
@@ -38,13 +36,7 @@
     {
         return new TestCase( name )
         {
-            public int countTestCases()
-            {
-                return 1;
-            }
-
-
-            public void run( TestResult result )
+            public void runTest() throws Throwable
             {
                 try
                 {
@@ -52,23 +44,7 @@
                 }
                 catch ( InvocationTargetException e )
                 {
-                    Throwable c = e.getCause();
-                    if ( c instanceof AssertionFailedError )
-                    {
-                        result.addFailure( this, ( AssertionFailedError ) c );
-                    }
-                    else
-                    {
-                        result.addError( this, c );
-                    }
-                }
-                catch ( AssertionFailedError e )
-                {
-                    result.addFailure( this, e );
-                }
-                catch ( Throwable t )
-                {
-                    result.addError( this, t );
+                    throw e.getCause();
                 }
             }
         };