maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1081527 - in /maven/surefire/trunk: surefire-api/src/main/java/org/apache/maven/surefire/report/ surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/ surefire-providers/common-junit4/src/main/java/org/apa...
Date Mon, 14 Mar 2011 19:31:35 GMT
Author: krosenvold
Date: Mon Mar 14 19:31:34 2011
New Revision: 1081527

URL: http://svn.apache.org/viewvc?rev=1081527&view=rev
Log:
o Refactored/renamed interfaces and split the
test-framework part of reporting from the
reporting (to disk part).

This chagne has been impossible until now,
hooray for isolation!

Added:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java   (contents, props changed)
      - copied, changed from r1081511, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportWriter.java
    maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/
    maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java   (contents, props changed)
      - copied, changed from r1081511, maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MockReporter.java
Removed:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportWriter.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MockReporter.java
Modified:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/MulticastingReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
    maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
    maven/surefire/trunk/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java
    maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/LogicalStream.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestMethod.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListenerTest.java
    maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java
    maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractReporter.java Mon Mar 14 19:31:34 2011
@@ -28,7 +28,7 @@ import java.util.Locale;
  * @version $Id$
  */
 public abstract class AbstractReporter
-    implements Reporter, ReportWriter
+    implements Reporter
 {
     int completedCount;
 

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/MulticastingReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/MulticastingReporter.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/MulticastingReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/MulticastingReporter.java Mon Mar 14 19:31:34 2011
@@ -28,7 +28,7 @@ import java.util.List;
  * @author Kristian Rosenvold
  */
 public class MulticastingReporter
-    implements Reporter, RunReporter, ReportWriter
+    implements RunReporter, Reporter
 {
     private final List target;
 
@@ -42,7 +42,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).testSetStarting( report );
+            ( (Reporter) it.next() ).testSetStarting( report );
         }
     }
 
@@ -52,7 +52,7 @@ public class MulticastingReporter
         {
             try
             {
-                ( (ReportWriter) it.next() ).testSetCompleted( report );
+                ( (Reporter) it.next() ).testSetCompleted( report );
             }
             catch ( ReporterException e )
             {
@@ -92,7 +92,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).testStarting( report );
+            ( (Reporter) it.next() ).testStarting( report );
         }
     }
 
@@ -100,7 +100,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).testSucceeded( report );
+            ( (Reporter) it.next() ).testSucceeded( report );
         }
     }
 
@@ -108,7 +108,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).testError( report, stdOut, stdErr );
+            ( (Reporter) it.next() ).testError( report, stdOut, stdErr );
         }
     }
 
@@ -116,7 +116,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).testFailed( report, stdOut, stdErr );
+            ( (Reporter) it.next() ).testFailed( report, stdOut, stdErr );
         }
     }
 
@@ -124,20 +124,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).testSkipped( report );
-        }
-    }
-
-    public void writeConsoleMessage( String message )
-    {
-        for ( Iterator it = target.iterator(); it.hasNext(); )
-        {
-            ReportWriter reporter = ( (ReportWriter) it.next() );
-            // Todo: Really need to find out how the surefire4.x provider manages to avoid printing to this one.
-            if ( !( reporter instanceof BriefFileReporter ) )
-            {
-                reporter.writeMessage( message );
-            }
+            ( (Reporter) it.next() ).testSkipped( report );
         }
     }
 
@@ -145,7 +132,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ReportWriter reporter = ( (ReportWriter) it.next() );
+            Reporter reporter = ( (Reporter) it.next() );
             reporter.writeDetailMessage( message );
         }
     }
@@ -154,7 +141,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).writeMessage( message );
+            ( (Reporter) it.next() ).writeMessage( message );
         }
     }
 
@@ -162,7 +149,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).writeFooter( footer );
+            ( (Reporter) it.next() ).writeFooter( footer );
         }
     }
 
@@ -170,7 +157,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).reset();
+            ( (Reporter) it.next() ).reset();
         }
     }
 
@@ -178,7 +165,7 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).testError( report );
+            ( (Reporter) it.next() ).testError( report );
         }
     }
 
@@ -186,12 +173,8 @@ public class MulticastingReporter
     {
         for ( Iterator it = target.iterator(); it.hasNext(); )
         {
-            ( (ReportWriter) it.next() ).testFailed( report );
+            ( (Reporter) it.next() ).testFailed( report );
         }
     }
 
-    public void testAssumptionFailure( ReportEntry report )
-    {
-        // Do nothing right now.
-    }
 }

Copied: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java (from r1081511, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportWriter.java)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java?p2=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java&p1=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportWriter.java&r1=1081511&r2=1081527&rev=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportWriter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java Mon Mar 14 19:31:34 2011
@@ -20,19 +20,19 @@ package org.apache.maven.surefire.report
  */
 
 /**
- * Persists reports somewhere
+ * Used by providers to report results.
+ * Using this interface integrates the providers together into a common reporting infrastructure.
  * <p/>
  * An instance of a reporter is not guaranteed to be thread-safe and concurrent test frameworks
  * must request an instance of a reporter per-thread from the ReporterFactory.
  */
-public interface ReportWriter
+public interface ProviderReporter
 {
     /**
      * Indicates the start of a given test-set
      *
      * @param report the report entry describing the testset
-     * @throws org.apache.maven.surefire.report.ReporterException
-     *          When reporting fails
+     * @throws ReporterException When reporting fails
      */
     void testSetStarting( ReportEntry report )
         throws ReporterException;
@@ -41,8 +41,7 @@ public interface ReportWriter
      * Indicates end of a given test-set
      *
      * @param report the report entry describing the testset
-     * @throws org.apache.maven.surefire.report.ReporterException
-     *          When reporting fails
+     * @throws ReporterException When reporting fails
      */
     void testSetCompleted( ReportEntry report )
         throws ReporterException;
@@ -64,6 +63,15 @@ public interface ReportWriter
     void testSucceeded( ReportEntry report );
 
     /**
+     * Event fired when a test assumption failure was encountered.
+     * An assumption failure indicates that the test is not relevant
+     *
+     * @param report The report entry to log for
+     */
+    void testAssumptionFailure( ReportEntry report );
+
+
+    /**
      * Event fired when a test ended with an error (non anticipated problem)
      *
      * @param report The report entry to log for
@@ -86,6 +94,7 @@ public interface ReportWriter
      * @param report The report entry to log for
      * @param stdOut standard output from the test case
      * @param stdErr error output from the test case
+     * @deprecated remove when building with 2.7.2
      */
     void testError( ReportEntry report, String stdOut, String stdErr );
 
@@ -95,6 +104,7 @@ public interface ReportWriter
      * @param report The report entry to log for
      * @param stdOut standard output from the test case
      * @param stdErr error output from the test case
+     * @deprecated remove when building with 2.7.2
      */
     void testFailed( ReportEntry report, String stdOut, String stdErr );
 
@@ -104,22 +114,8 @@ public interface ReportWriter
      * which is controlled by reportFormat.
      *
      * @param message The message to write.
+     * @deprecated remove when building with 2.7.2
      */
     void writeMessage( String message );
 
-    /**
-     * Writes a detailed message that will not necessarily be displayed in all channels.
-     * This is controlled by reportFormat attribute on the plugin.
-     *
-     * @param message The message to write
-     */
-    void writeDetailMessage( String message );
-
-    /**
-     * Restores the instance of the reporter, making the instance re-usable for a subsequent run in the
-     * same thread.
-     */
-    void reset();
-
-    void writeFooter( String footer );
 }

Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ProviderReporter.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/Reporter.java Mon Mar 14 19:31:34 2011
@@ -20,8 +20,7 @@ package org.apache.maven.surefire.report
  */
 
 /**
- * Used by providers to report results.
- * Using this interface integrates the providers together into a common reporting infrastructure.
+ * Persists reports somewhere
  * <p/>
  * An instance of a reporter is not guaranteed to be thread-safe and concurrent test frameworks
  * must request an instance of a reporter per-thread from the ReporterFactory.
@@ -32,7 +31,8 @@ public interface Reporter
      * Indicates the start of a given test-set
      *
      * @param report the report entry describing the testset
-     * @throws ReporterException When reporting fails
+     * @throws org.apache.maven.surefire.report.ReporterException
+     *          When reporting fails
      */
     void testSetStarting( ReportEntry report )
         throws ReporterException;
@@ -41,7 +41,8 @@ public interface Reporter
      * Indicates end of a given test-set
      *
      * @param report the report entry describing the testset
-     * @throws ReporterException When reporting fails
+     * @throws org.apache.maven.surefire.report.ReporterException
+     *          When reporting fails
      */
     void testSetCompleted( ReportEntry report )
         throws ReporterException;
@@ -63,15 +64,6 @@ public interface Reporter
     void testSucceeded( ReportEntry report );
 
     /**
-     * Event fired when a test assumption failure was encountered.
-     * An assumption failure indicates that the test is not relevant
-     *
-     * @param report The report entry to log for
-     */
-    void testAssumptionFailure( ReportEntry report );
-
-
-    /**
      * Event fired when a test ended with an error (non anticipated problem)
      *
      * @param report The report entry to log for
@@ -94,7 +86,6 @@ public interface Reporter
      * @param report The report entry to log for
      * @param stdOut standard output from the test case
      * @param stdErr error output from the test case
-     * @deprecated remove when building with 2.7.2
      */
     void testError( ReportEntry report, String stdOut, String stdErr );
 
@@ -104,7 +95,6 @@ public interface Reporter
      * @param report The report entry to log for
      * @param stdOut standard output from the test case
      * @param stdErr error output from the test case
-     * @deprecated remove when building with 2.7.2
      */
     void testFailed( ReportEntry report, String stdOut, String stdErr );
 
@@ -114,7 +104,6 @@ public interface Reporter
      * which is controlled by reportFormat.
      *
      * @param message The message to write.
-     * @deprecated remove when building with 2.7.2
      */
     void writeMessage( String message );
 
@@ -123,20 +112,14 @@ public interface Reporter
      * This is controlled by reportFormat attribute on the plugin.
      *
      * @param message The message to write
-     * @deprecated remove when building with 2.7.2
      */
     void writeDetailMessage( String message );
 
     /**
      * Restores the instance of the reporter, making the instance re-usable for a subsequent run in the
      * same thread.
-     *
-     * @deprecated remove when building with 2.7.2
      */
     void reset();
 
-    /**
-     * @deprecated remove when building with 2.7.2
-     */
     void writeFooter( String footer );
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterFactory.java Mon Mar 14 19:31:34 2011
@@ -34,7 +34,7 @@ public interface ReporterFactory
      *
      * @return A reporter instance
      */
-    Reporter createReporter();
+    ProviderReporter createReporter();
 
     RunResult close();
 }

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManager.java Mon Mar 14 19:31:34 2011
@@ -37,7 +37,7 @@ import java.util.List;
  * <p/>
  */
 public class ReporterManager
-    implements Reporter, RunReporter, ReportWriter
+    implements ProviderReporter, RunReporter, Reporter
 {
     private final RunStatistics runStatisticsForThis;
 

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReporterManagerFactory.java Mon Mar 14 19:31:34 2011
@@ -76,14 +76,14 @@ public class ReporterManagerFactory
         return globalRunStatistics;
     }
 
-    public Reporter createReporter()
+    public ProviderReporter createReporter()
     {
         reports = instantiateReportsNewStyle( reportDefinitions, reporterConfiguration, surefireClassLoader );
         return setupReporter( reports );
     }
 
 
-    private Reporter setupReporter( List reports )
+    private ProviderReporter setupReporter( List reports )
     {
         // Note, if we ever start making >1 reporter Managers, we have to aggregate run statistics
         // i.e. we cannot use a single "globalRunStatistics"

Modified: maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java (original)
+++ maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/common/junit4/JUnit4RunListener.java Mon Mar 14 19:31:34 2011
@@ -19,8 +19,8 @@ package org.apache.maven.surefire.common
  * under the License.
  */
 
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.junit.runner.Description;
 import org.junit.runner.notification.Failure;
@@ -37,7 +37,7 @@ public class JUnit4RunListener
                                                                + "[^\\\\(\\\\)]+" //non-parens
                                                                + ")\\)" + "$" ); // then a close-paren (end group match)
 
-    protected final Reporter reporter;
+    protected final ProviderReporter reporter;
 
     /**
      * This flag is set after a failure has occurred so that a <code>testSucceeded</code> event is not fired.
@@ -50,7 +50,7 @@ public class JUnit4RunListener
      *
      * @param reporter the reporter to log testing events to
      */
-    public JUnit4RunListener( Reporter reporter )
+    public JUnit4RunListener( ProviderReporter reporter )
     {
         this.reporter = reporter;
     }

Copied: maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java (from r1081511, maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MockReporter.java)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java?p2=maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java&p1=maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MockReporter.java&r1=1081511&r2=1081527&rev=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MockReporter.java (original)
+++ maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java Mon Mar 14 19:31:34 2011
@@ -1,4 +1,4 @@
-package org.apache.maven.surefire.junitcore;
+package org.apache.maven.surefire.junit4;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,8 +19,8 @@ package org.apache.maven.surefire.junitc
  * under the License.
  */
 
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterException;
 
@@ -28,8 +28,9 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 
+/** Internal use only */
 public class MockReporter
-    implements Reporter
+    implements ProviderReporter
 {
     private final List<String> events = new ArrayList<String>();
 
@@ -120,10 +121,6 @@ public class MockReporter
         testIgnored.incrementAndGet();
     }
 
-    public void reset()
-    {
-    }
-
     public void writeMessage( String message )
     {
     }

Propchange: maven/surefire/trunk/surefire-providers/common-junit4/src/main/java/org/apache/maven/surefire/junit4/MockReporter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: maven/surefire/trunk/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java (original)
+++ maven/surefire/trunk/surefire-providers/common-junit4/src/test/java/org/apache/maven/surefire/common/junit4/JUnit4RunListenerTest.java Mon Mar 14 19:31:34 2011
@@ -19,15 +19,14 @@ package org.apache.maven.surefire.common
  * under the License.
  */
 
-import org.apache.maven.surefire.report.MulticastingReporter;
+import org.apache.maven.surefire.junit4.MockReporter;
+
 import org.junit.Test;
 import org.junit.runner.Request;
 import org.junit.runner.Runner;
 import org.junit.runner.notification.RunListener;
 import org.junit.runner.notification.RunNotifier;
 
-import java.util.Collections;
-
 /**
  * @author Kristian Rosenvold
  */
@@ -38,7 +37,7 @@ public class JUnit4RunListenerTest
         throws Exception
     {
         RunListener jUnit4TestSetReporter =
-            new JUnit4RunListener( new MulticastingReporter( Collections.emptyList() ) );
+            new JUnit4RunListener( new MockReporter( ) );
         Runner junitTestRunner = Request.classes( "abc", STest1.class, STest2.class ).getRunner();
         RunNotifier runNotifier = new RunNotifier();
         runNotifier.addListener( jUnit4TestSetReporter );

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java Mon Mar 14 19:31:34 2011
@@ -23,8 +23,8 @@ import org.apache.maven.surefire.common.
 import org.apache.maven.surefire.common.junit3.JUnit3TestChecker;
 import org.apache.maven.surefire.providerapi.AbstractProvider;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.SimpleReportEntry;
@@ -76,7 +76,7 @@ public class JUnit3Provider
 
         ReporterFactory reporterFactory = providerParameters.getReporterFactory();
 
-        Reporter reporter = reporterFactory.createReporter();
+        ProviderReporter reporter = reporterFactory.createReporter();
 
         for ( Iterator iter = testsToRun.iterator(); iter.hasNext(); )
         {
@@ -97,7 +97,7 @@ public class JUnit3Provider
 
     }
 
-    private void executeTestSet( SurefireTestSet testSet, Reporter reporter, ClassLoader classLoader )
+    private void executeTestSet( SurefireTestSet testSet, ProviderReporter reporter, ClassLoader classLoader )
         throws ReporterException, TestSetFailedException
     {
 

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/JUnitTestSet.java Mon Mar 14 19:31:34 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.junit;
  */
 
 import org.apache.maven.surefire.common.junit3.JUnit3Reflector;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 
 import java.lang.reflect.InvocationTargetException;
@@ -72,7 +72,7 @@ public final class JUnitTestSet
     }
 
 
-    public void execute( Reporter reporter, ClassLoader loader )
+    public void execute( ProviderReporter reporter, ClassLoader loader )
         throws TestSetFailedException
     {
         Class testClass = getTestClass();

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java Mon Mar 14 19:31:34 2011
@@ -20,8 +20,8 @@ package org.apache.maven.surefire.junit;
  */
 
 import org.apache.maven.surefire.report.PojoStackTraceWriter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 
@@ -73,7 +73,7 @@ public class PojoTestSet
         }
     }
 
-    public void execute( Reporter reportManager, ClassLoader loader )
+    public void execute( ProviderReporter reportManager, ClassLoader loader )
         throws TestSetFailedException
     {
         if ( reportManager == null )
@@ -84,7 +84,7 @@ public class PojoTestSet
         executeTestMethods( reportManager );
     }
 
-    private void executeTestMethods( Reporter reportManager )
+    private void executeTestMethods( ProviderReporter reportManager )
     {
         if ( reportManager == null )
         {
@@ -104,7 +104,7 @@ public class PojoTestSet
         }
     }
 
-    private boolean executeTestMethod( Method method, Object[] args, Reporter reportManager )
+    private boolean executeTestMethod( Method method, Object[] args, ProviderReporter reportManager )
     {
         if ( method == null || args == null || reportManager == null )
         {

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/SurefireTestSet.java Mon Mar 14 19:31:34 2011
@@ -19,12 +19,12 @@ package org.apache.maven.surefire.junit;
  * under the License.
  */
 
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 
 public interface SurefireTestSet
 {
-    void execute( Reporter reportManager, ClassLoader loader )
+    void execute( ProviderReporter reportManager, ClassLoader loader )
         throws TestSetFailedException;
 
     String getName();

Modified: maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit3/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java Mon Mar 14 19:31:34 2011
@@ -19,8 +19,8 @@ package org.apache.maven.surefire.junit;
  * under the License.
  */
 
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 
 import java.lang.reflect.InvocationHandler;
@@ -43,7 +43,7 @@ public class TestListenerInvocationHandl
 
     private final Set failedTestsSet = new HashSet();
 
-    private Reporter reporter;
+    private ProviderReporter reporter;
 
     private static final Class[] EMPTY_CLASS_ARRAY = new Class[]{ };
 
@@ -103,7 +103,7 @@ public class TestListenerInvocationHandl
         }
     }
 
-    public TestListenerInvocationHandler( Reporter reporter )
+    public TestListenerInvocationHandler( ProviderReporter reporter )
     {
         if ( reporter == null )
         {

Modified: maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4Provider.java Mon Mar 14 19:31:34 2011
@@ -26,8 +26,8 @@ import org.apache.maven.surefire.common.
 import org.apache.maven.surefire.providerapi.AbstractProvider;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
 import org.apache.maven.surefire.report.PojoStackTraceWriter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.SimpleReportEntry;
@@ -92,7 +92,7 @@ public class JUnit4Provider extends Abst
 
         final ReporterFactory reporterFactory = providerParameters.getReporterFactory();
 
-        Reporter reporter = reporterFactory.createReporter();
+        ProviderReporter reporter = reporterFactory.createReporter();
         JUnit4RunListener jUnit4TestSetReporter = new JUnit4RunListener( reporter );
         RunNotifier runNotifer = getRunNotifer( jUnit4TestSetReporter, customRunListeners );
 
@@ -107,7 +107,7 @@ public class JUnit4Provider extends Abst
 
     }
 
-    private void executeTestSet( Class clazz, Reporter reporter, ClassLoader classLoader, RunNotifier listeners )
+    private void executeTestSet( Class clazz, ProviderReporter reporter, ClassLoader classLoader, RunNotifier listeners )
         throws ReporterException, TestSetFailedException
     {
         final ReportEntry report = new SimpleReportEntry( this.getClass().getName(), clazz.getName() );

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManager.java Mon Mar 14 19:31:34 2011
@@ -19,8 +19,8 @@ package org.apache.maven.surefire.junitc
  * under the License.
  */
 
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
@@ -33,13 +33,13 @@ import java.util.Map;
  * @author Kristian Rosenvold
  */
 public abstract class ConcurrentReporterManager
-    implements Reporter
+    implements ProviderReporter
 {
     private final Map<String, TestSet> classMethodCounts;
 
     private final ReporterConfiguration reporterConfiguration;
 
-    private final ThreadLocal<Reporter> reporterManagerThreadLocal = new ThreadLocal<Reporter>();
+    private final ThreadLocal<ProviderReporter> reporterManagerThreadLocal = new ThreadLocal<ProviderReporter>();
 
     private final boolean reportImmediately;
 
@@ -142,31 +142,16 @@ public abstract class ConcurrentReporter
 
     protected abstract void checkIfTestSetCanBeReported( TestSet testSetForTest );
 
-    public void writeFooter( String footer )
-    {
-        throw new UnsupportedOperationException();
-    }
-
     public void writeMessage( String message )
     {
         throw new UnsupportedOperationException();
     }
 
-    public void reset()
-    {
-        throw new UnsupportedOperationException();
-    }
-
     public void testFailed( ReportEntry report, String stdOut, String stdErr )
     {
         throw new UnsupportedOperationException();
     }
 
-    public void writeDetailMessage( String message )
-    {
-        throw new UnsupportedOperationException();
-    }
-
     public void testError( ReportEntry failure, String out, String err )
     {
         throw new UnsupportedOperationException();
@@ -187,9 +172,9 @@ public abstract class ConcurrentReporter
         return classMethodCounts.get( description.getSourceName() );
     }
 
-    Reporter getReporterManager()
+    ProviderReporter getReporterManager()
     {
-        Reporter reporterManager = reporterManagerThreadLocal.get();
+        ProviderReporter reporterManager = reporterManagerThreadLocal.get();
         if ( reporterManager == null )
         {
             reporterManager = reporterFactory.createReporter();

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreProvider.java Mon Mar 14 19:31:34 2011
@@ -23,7 +23,7 @@ import org.apache.maven.surefire.common.
 import org.apache.maven.surefire.common.junit4.JUnit4TestChecker;
 import org.apache.maven.surefire.providerapi.AbstractProvider;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
@@ -100,7 +100,7 @@ public class JUnitCoreProvider
         }
         final Map<String, TestSet> testSetMap = new ConcurrentHashMap<String, TestSet>();
 
-        Reporter listener =
+        ProviderReporter listener =
             ConcurrentReporterManager.createInstance( testSetMap, reporterFactory, this.reporterConfiguration,
                                                       jUnitCoreParameters.isParallelClasses(),
                                                       jUnitCoreParameters.isParallelBoth() );

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListener.java Mon Mar 14 19:31:34 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.junitc
  */
 
 import org.apache.maven.surefire.common.junit4.JUnit4RunListener;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 
 import java.util.ArrayList;
 import java.util.Map;
@@ -37,7 +37,7 @@ public class JUnitCoreRunListener
      * @param reporter          the report manager to log testing events to
      * @param classMethodCounts A map of methods
      */
-    public JUnitCoreRunListener( Reporter reporter, Map<String, TestSet> classMethodCounts )
+    public JUnitCoreRunListener( ProviderReporter reporter, Map<String, TestSet> classMethodCounts )
     {
         super( reporter );
         this.classMethodCounts = classMethodCounts;

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/LogicalStream.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/LogicalStream.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/LogicalStream.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/LogicalStream.java Mon Mar 14 19:31:34 2011
@@ -19,7 +19,7 @@ package org.apache.maven.surefire.junitc
  * under the License.
  */
 
-import org.apache.maven.surefire.report.ReportWriter;
+import org.apache.maven.surefire.report.Reporter;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -54,7 +54,7 @@ public class LogicalStream
         }
 
 
-        public void writeDetails( ReportWriter reporter )
+        public void writeDetails( Reporter reporter )
         {
             reporter.writeDetailMessage( value );
         }
@@ -80,7 +80,7 @@ public class LogicalStream
         }
     }
 
-    public void writeDetails( ReportWriter reporter )
+    public void writeDetails( Reporter reporter )
     {
         for ( Entry entry : output )
         {

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestMethod.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestMethod.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestMethod.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestMethod.java Mon Mar 14 19:31:34 2011
@@ -19,8 +19,8 @@ package org.apache.maven.surefire.junitc
  * under the License.
  */
 
+import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.ReportWriter;
 
 /**
  * Represents the test-state of a single test method that is run.
@@ -85,7 +85,7 @@ class TestMethod
     }
 
 
-    public void replay( ReportWriter reporter )
+    public void replay( Reporter reporter )
         throws Exception
     {
 

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/main/java/org/apache/maven/surefire/junitcore/TestSet.java Mon Mar 14 19:31:34 2011
@@ -19,8 +19,8 @@ package org.apache.maven.surefire.junitc
  * under the License.
  */
 
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.ReportWriter;
 import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 
@@ -61,7 +61,7 @@ public class TestSet
         this.testSetDescription = testSetDescription;
     }
 
-    public void replay( Reporter target )
+    public void replay( ProviderReporter target )
     {
         if ( !played.compareAndSet( false, true ) )
         {
@@ -81,7 +81,7 @@ public class TestSet
 
             for ( TestMethod testMethod : testMethods )
             {
-                testMethod.replay( (ReportWriter) target );
+                testMethod.replay( (Reporter) target );
             }
             report = createReportEntry( elapsed );
 
@@ -118,7 +118,7 @@ public class TestSet
         testMethods.add( testMethod );
     }
 
-    public void incrementFinishedTests( Reporter reporterManager, boolean reportImmediately )
+    public void incrementFinishedTests( ProviderReporter reporterManager, boolean reportImmediately )
     {
         numberOfCompletedChildren.incrementAndGet();
         if ( allScheduled.get() && isAllTestsDone() && reportImmediately )
@@ -127,7 +127,7 @@ public class TestSet
         }
     }
 
-    public void setAllScheduled( Reporter reporterManager )
+    public void setAllScheduled( ProviderReporter reporterManager )
     {
         allScheduled.set( true );
         if ( isAllTestsDone() )

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/ConcurrentReporterManagerTest.java Mon Mar 14 19:31:34 2011
@@ -24,7 +24,7 @@ import junit.framework.Assert;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import org.apache.maven.surefire.report.ConsoleReporter;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManagerFactory;
@@ -157,7 +157,7 @@ public class ConcurrentReporterManagerTe
     {
         ReporterFactory reporterFactory = createReporterFactory();
         HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
-        Reporter reporter =
+        ProviderReporter reporter =
             new ClassesParallelRunListener( classMethodCounts, reporterFactory, getReporterConfiguration() );
         JUnitCoreRunListener runListener = new JUnitCoreRunListener( reporter, classMethodCounts );
         RunStatistics result = runClasses( reporterFactory, runListener, classes );

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListenerTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListenerTest.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListenerTest.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/JUnitCoreRunListenerTest.java Mon Mar 14 19:31:34 2011
@@ -1,7 +1,10 @@
 package org.apache.maven.surefire.junitcore;
 
+import org.apache.maven.surefire.junit4.MockReporter;
+
+import java.util.HashMap;
+
 import junit.framework.TestCase;
-import org.apache.maven.surefire.report.MulticastingReporter;
 import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.Computer;
@@ -9,11 +12,6 @@ import org.junit.runner.JUnitCore;
 import org.junit.runner.Result;
 import org.junit.runner.notification.RunListener;
 
-import java.util.Collections;
-import java.util.HashMap;
-
-import static junit.framework.Assert.assertEquals;
-
 /**
  * @author Kristian Rosenvold
  */
@@ -22,7 +20,7 @@ public class JUnitCoreRunListenerTest  e
     public void testTestRunStarted()
         throws Exception
     {
-        RunListener jUnit4TestSetReporter = new JUnitCoreRunListener( new MulticastingReporter( Collections.emptyList() ),
+        RunListener jUnit4TestSetReporter = new JUnitCoreRunListener( new MockReporter(  )  ,
                                                                       new HashMap<String, TestSet>(  ) );
         JUnitCore core = new JUnitCore();
         core.addListener(  jUnit4TestSetReporter );
@@ -34,7 +32,7 @@ public class JUnitCoreRunListenerTest  e
     public void testFailedAssumption()
         throws Exception
     {
-        RunListener jUnit4TestSetReporter = new JUnitCoreRunListener( new MulticastingReporter( Collections.emptyList() ),
+        RunListener jUnit4TestSetReporter = new JUnitCoreRunListener( new MockReporter(  ) ,
                                                                       new HashMap<String, TestSet>(  ) );
         JUnitCore core = new JUnitCore();
         core.addListener(  jUnit4TestSetReporter );

Modified: maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit47/src/test/java/org/apache/maven/surefire/junitcore/MavenSurefireJUnit47RunnerTest.java Mon Mar 14 19:31:34 2011
@@ -17,7 +17,7 @@
 package org.apache.maven.surefire.junitcore;
 
 import junit.framework.TestCase;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReporterConfiguration;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManagerFactory;
@@ -124,7 +124,7 @@ public class MavenSurefireJUnit47RunnerT
             new ReporterManagerFactory( this.getClass().getClassLoader(), reporterConfiguration );
 
         final HashMap<String, TestSet> classMethodCounts = new HashMap<String, TestSet>();
-        Reporter reporter = ConcurrentReporterManager.createInstance( classMethodCounts, reporterManagerFactory,
+        ProviderReporter reporter = ConcurrentReporterManager.createInstance( classMethodCounts, reporterManagerFactory,
                                                                       getReporterConfiguration(), false, false );
 
         RunListener concurrentReportingRunListener = new JUnitCoreRunListener( reporter, classMethodCounts );

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/ConfigurationAwareTestNGReporter.java Mon Mar 14 19:31:34 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.testng
  */
 
 
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 
 import org.testng.internal.IResultListener;
 
@@ -35,7 +35,7 @@ public class ConfigurationAwareTestNGRep
     implements IResultListener
 {
 
-    public ConfigurationAwareTestNGReporter( Reporter reportManager, TestNgTestSuite source )
+    public ConfigurationAwareTestNGReporter( ProviderReporter reportManager, TestNgTestSuite source )
     {
         super( reportManager );
     }

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/SynchronizedReporterManager.java Mon Mar 14 19:31:34 2011
@@ -20,7 +20,7 @@ package org.apache.maven.surefire.testng
  */
 
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReporterException;
 
 /**
@@ -57,12 +57,12 @@ import org.apache.maven.surefire.report.
  * @noinspection deprecation
  */
 class SynchronizedReporterManager
-    implements Reporter
+    implements ProviderReporter
 {
 
-    private final Reporter target;
+    private final ProviderReporter target;
 
-    public SynchronizedReporterManager( Reporter target )
+    public SynchronizedReporterManager( ProviderReporter target )
     {
         this.target = target;
     }
@@ -104,11 +104,6 @@ class SynchronizedReporterManager
         target.testSkipped( report );
     }
 
-    public synchronized void reset()
-    {
-        target.reset();
-    }
-
     public synchronized void writeMessage( String message )
     {
         target.writeMessage( message );
@@ -125,16 +120,6 @@ class SynchronizedReporterManager
         target.testFailed( reportEntry );
     }
 
-    public synchronized void writeDetailMessage( String message )
-    {
-        target.writeDetailMessage( message );
-    }
-
-    public synchronized void writeFooter( String footer )
-    {
-        target.writeFooter( footer );
-    }
-
     public synchronized void testAssumptionFailure( ReportEntry report )
     {
         target.testAssumptionFailure( report );

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGDirectoryTestSuite.java Mon Mar 14 19:31:34 2011
@@ -22,8 +22,8 @@ package org.apache.maven.surefire.testng
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
 import org.apache.maven.surefire.NonAbstractClassFilter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManagerFactory;
@@ -96,7 +96,7 @@ public class TestNGDirectoryTestSuite
             return;
         }
 
-        Reporter reporter = reporterManagerFactory.createReporter();
+        ProviderReporter reporter = reporterManagerFactory.createReporter();
         startTestSuite( reporter, this );
 
         TestNGExecutor.run( new Class[]{ (Class) testsToRun.iterator().next() }, this.testSourceDirectory, this.options,
@@ -141,7 +141,7 @@ public class TestNGDirectoryTestSuite
             junitReportsDirectory = new File( reportsDirectory, "testng-junit-results" );
         }
 
-        Reporter reporterManager = new SynchronizedReporterManager( reporterFactory.createReporter() );
+        ProviderReporter reporterManager = new SynchronizedReporterManager( reporterFactory.createReporter() );
         startTestSuite( reporterManager, this );
 
         Class[] testClasses = (Class[]) testNgTestClasses.toArray( new Class[testNgTestClasses.size()] );
@@ -184,7 +184,7 @@ public class TestNGDirectoryTestSuite
             throw new TestSetFailedException( "Unable to find test set '" + testSetName + "' in suite" );
         }
 
-        Reporter reporter = reporterManagerFactory.createReporter();
+        ProviderReporter reporter = reporterManagerFactory.createReporter();
         startTestSuite( reporter, this );
 
         TestNGExecutor.run( new Class[]{ testSet.getTestClass() }, this.testSourceDirectory, this.options, this.version,
@@ -193,7 +193,7 @@ public class TestNGDirectoryTestSuite
         finishTestSuite( reporter, this );
     }
 
-    public static void startTestSuite( Reporter reporter, Object suite )
+    public static void startTestSuite( ProviderReporter reporter, Object suite )
     {
         ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );
 
@@ -207,7 +207,7 @@ public class TestNGDirectoryTestSuite
         }
     }
 
-    public static void finishTestSuite( Reporter reporterManager, Object suite )
+    public static void finishTestSuite( ProviderReporter reporterManager, Object suite )
         throws ReporterException
     {
         ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGExecutor.java Mon Mar 14 19:31:34 2011
@@ -29,7 +29,7 @@ import java.util.Map;
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.testng.conf.Configurator;
 import org.apache.maven.surefire.testng.conf.TestNG4751Configurator;
 import org.apache.maven.surefire.testng.conf.TestNG52Configurator;
@@ -55,7 +55,7 @@ public class TestNGExecutor
     }
 
     public static void run( Class[] testClasses, String testSourceDirectory, Map options, ArtifactVersion version,
-                            Reporter reportManager, TestNgTestSuite suite, File reportsDirectory, final String methodNamePattern )
+                            ProviderReporter reportManager, TestNgTestSuite suite, File reportsDirectory, final String methodNamePattern )
         throws TestSetFailedException
     {
         TestNG testng = new TestNG( true );
@@ -111,7 +111,7 @@ public class TestNGExecutor
     }
     
     public static void run( List suiteFiles, String testSourceDirectory, Map options, ArtifactVersion version,
-                            Reporter reportManager, TestNgTestSuite suite, File reportsDirectory )
+                            ProviderReporter reportManager, TestNgTestSuite suite, File reportsDirectory )
         throws TestSetFailedException
     {
         TestNG testng = new TestNG( true );
@@ -152,7 +152,7 @@ public class TestNGExecutor
     }
 
 
-    private static void postConfigure( TestNG testNG, String sourcePath, Reporter reportManager, TestNgTestSuite suite,
+    private static void postConfigure( TestNG testNG, String sourcePath, ProviderReporter reportManager, TestNgTestSuite suite,
                                        File reportsDirectory )
         throws TestSetFailedException
     {
@@ -173,7 +173,7 @@ public class TestNGExecutor
 
     // If we have access to IResultListener, return a ConfigurationAwareTestNGReporter
     // But don't cause NoClassDefFoundErrors if it isn't available; just return a regular TestNGReporter instead
-    private static TestNGReporter createTestNGReporter( Reporter reportManager, TestNgTestSuite suite )
+    private static TestNGReporter createTestNGReporter( ProviderReporter reportManager, TestNgTestSuite suite )
     {
         try
         {
@@ -181,7 +181,7 @@ public class TestNGExecutor
             Class c = Class.forName( "org.apache.maven.surefire.testng.ConfigurationAwareTestNGReporter" );
             try
             {
-                Constructor ctor = c.getConstructor( new Class[]{ Reporter.class, TestNgTestSuite.class } );
+                Constructor ctor = c.getConstructor( new Class[]{ ProviderReporter.class, TestNgTestSuite.class } );
                 return (TestNGReporter) ctor.newInstance( new Object[]{ reportManager, suite } );
             }
             catch ( Exception e )

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGReporter.java Mon Mar 14 19:31:34 2011
@@ -23,7 +23,7 @@ import org.apache.maven.surefire.Surefir
 import org.apache.maven.surefire.report.CategorizedReportEntry;
 import org.apache.maven.surefire.report.PojoStackTraceWriter;
 import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.SimpleReportEntry;
 
 import java.util.ResourceBundle;
@@ -38,7 +38,7 @@ import org.testng.TestNG;
 /**
  * Listens for and provides and adaptor layer so that
  * TestNG tests can report their status to the current
- * {@link org.apache.maven.surefire.report.Reporter}.
+ * {@link org.apache.maven.surefire.report.ProviderReporter}.
  *
  * @author jkuhnert
  * @noinspection ThrowableResultOfMethodCallIgnored
@@ -51,7 +51,7 @@ public class TestNGReporter
     /**
      * core Surefire reporting
      */
-    private final Reporter reporter;
+    private final ProviderReporter reporter;
 
     /**
      * Constructs a new instance that will listen to
@@ -63,7 +63,7 @@ public class TestNGReporter
      *
      * @param reportManager Instance to report suite status to
      */
-    public TestNGReporter( Reporter reportManager )
+    public TestNGReporter( ProviderReporter reportManager )
     {
         this.reporter = reportManager;
 

Modified: maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java?rev=1081527&r1=1081526&r2=1081527&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/TestNGXmlTestSuite.java Mon Mar 14 19:31:34 2011
@@ -21,7 +21,7 @@ package org.apache.maven.surefire.testng
 
 import org.apache.maven.artifact.versioning.ArtifactVersion;
 import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
-import org.apache.maven.surefire.report.Reporter;
+import org.apache.maven.surefire.report.ProviderReporter;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterManagerFactory;
 import org.apache.maven.surefire.testset.TestSetFailedException;
@@ -83,7 +83,7 @@ public class TestNGXmlTestSuite
         {
             throw new IllegalStateException( "You must call locateTestSets before calling execute" );
         }
-        Reporter reporter = new SynchronizedReporterManager( reporterManagerFactory.createReporter() );
+        ProviderReporter reporter = new SynchronizedReporterManager( reporterManagerFactory.createReporter() );
         TestNGDirectoryTestSuite.startTestSuite( reporter, this );
         TestNGExecutor.run( this.suiteFilePaths, this.testSourceDirectory, this.options, this.version, reporter,
                             this, reportsDirectory );



Mime
View raw message