maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1056406 - in /maven/surefire/trunk: maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/ surefire-api/src/main/java/org...
Date Fri, 07 Jan 2011 17:34:40 GMT
Author: krosenvold
Date: Fri Jan  7 17:34:39 2011
New Revision: 1056406

URL: http://svn.apache.org/viewvc?rev=1056406&view=rev
Log:
o Removed a big branch of unused code

No functional change

Added:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java   (with props)
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java
      - copied, changed from r1054768, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java
Modified:
    maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingStreamConsumerTest.java
    maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/AbstractOutputConsumerTestCase.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
    maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java
    maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java
    maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java
    maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java
    maven/surefire/trunk/surefire-providers/surefire-junit/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-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.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-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/TestNGReporter.java

Modified: maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingStreamConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingStreamConsumerTest.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingStreamConsumerTest.java (original)
+++ maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/ForkingStreamConsumerTest.java Fri Jan  7 17:34:39 2011
@@ -20,7 +20,7 @@ package org.apache.maven.plugin.surefire
  */
 
 import org.apache.maven.plugin.surefire.booterclient.output.OutputConsumer;
-import org.apache.maven.surefire.report.DefaultReportEntry;
+import org.apache.maven.surefire.report.CategorizedReportEntry;
 import org.apache.maven.surefire.report.ForkingConsoleReporter;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.jmock.Mock;
@@ -51,7 +51,7 @@ public class ForkingStreamConsumerTest
         outputConsumerMock = new Mock( OutputConsumer.class );
         streamConsumer = new ForkingStreamConsumer( (OutputConsumer) outputConsumerMock.proxy() );
         message = "message";
-        reportEntry = DefaultReportEntry.nameGroup( "name", "group" );
+        reportEntry = CategorizedReportEntry.nameGroup( "name", "group" );
     }
 
     public void testConsumeHeaderLine()

Modified: maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/AbstractOutputConsumerTestCase.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/AbstractOutputConsumerTestCase.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/AbstractOutputConsumerTestCase.java (original)
+++ maven/surefire/trunk/maven-surefire-common/src/test/java/org/apache/maven/plugin/surefire/booterclient/output/AbstractOutputConsumerTestCase.java Fri Jan  7 17:34:39 2011
@@ -20,7 +20,7 @@ package org.apache.maven.plugin.surefire
  */
 
 import junit.framework.TestCase;
-import org.apache.maven.surefire.report.DefaultReportEntry;
+import org.apache.maven.surefire.report.CategorizedReportEntry;
 import org.apache.maven.surefire.report.ReportEntry;
 
 /**
@@ -43,7 +43,7 @@ public abstract class AbstractOutputCons
     {
         super.setUp();
         setLine( "line" );
-        setReportEntry( DefaultReportEntry.nameGroup( "name", "group" ) );
+        setReportEntry( CategorizedReportEntry.nameGroup( "name", "group" ) );
     }
 
     public void setOutputConsumer( OutputConsumer outputConsumer )

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/AbstractConsoleReporter.java Fri Jan  7 17:34:39 2011
@@ -46,8 +46,9 @@ public abstract class AbstractConsoleRep
     protected AbstractConsoleReporter( String format, ReporterConfiguration reporterConfiguration )
     {
         // TODO: use logger
-        super( new PrintWriter( new OutputStreamWriter( new BufferedOutputStream( ORIGINAL_SYSTEM_OUT, BUFFER_SIZE ) ) ),
-               format, reporterConfiguration );
+        super(
+            new PrintWriter( new OutputStreamWriter( new BufferedOutputStream( ORIGINAL_SYSTEM_OUT, BUFFER_SIZE ) ) ),
+            format, reporterConfiguration );
     }
 
     public void testSetStarting( ReportEntry report )
@@ -125,7 +126,7 @@ public abstract class AbstractConsoleRep
             }
         }
         name = message.substring( TEST_SET_STARTING_PREFIX.length(), i );
-        return DefaultReportEntry.nameGroup( name, group );
+        return CategorizedReportEntry.nameGroup( name, group );
     }
 
     /**

Added: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java?rev=1056406&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java (added)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/CategorizedReportEntry.java Fri Jan  7 17:34:39 2011
@@ -0,0 +1,86 @@
+package org.apache.maven.surefire.report;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @author Kristian Rosenvold
+ */
+public class CategorizedReportEntry
+    extends SimpleReportEntry
+    implements ReportEntry
+{
+    private final String group;
+
+    protected CategorizedReportEntry( String name, String group )
+    {
+        super( name );
+        this.group = group;
+    }
+
+    public CategorizedReportEntry( String source, String name, String group, String message )
+    {
+        this( source, name, group, message, null, null );
+    }
+
+    public CategorizedReportEntry( String source, String name, String group, String message,
+                                   StackTraceWriter stackTraceWriter, Integer elapsed )
+    {
+        super( source, name, stackTraceWriter, elapsed );
+        this.group = group;
+    }
+
+    public static ReportEntry nameGroup( String name, String group )
+    {
+        return new CategorizedReportEntry( name, group );
+    }
+
+    public String getGroup()
+    {
+        return group;
+    }
+
+    public boolean equals( Object o )
+    {
+        if ( this == o )
+        {
+            return true;
+        }
+        if ( o == null || getClass() != o.getClass() )
+        {
+            return false;
+        }
+        if ( !super.equals( o ) )
+        {
+            return false;
+        }
+
+        CategorizedReportEntry that = (CategorizedReportEntry) o;
+
+        return !( group != null ? !group.equals( that.group ) : that.group != null );
+
+    }
+
+    public int hashCode()
+    {
+        int result = super.hashCode();
+        result = 31 * result + ( group != null ? group.hashCode() : 0 );
+        return result;
+    }
+}

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

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java Fri Jan  7 17:34:39 2011
@@ -21,6 +21,7 @@ package org.apache.maven.surefire.report
 
 /**
  * @author Kristian Rosenvold
+ * @deprecated Delete once we build with 2.7.2
  */
 public class DefaultReportEntry
     implements ReportEntry
@@ -57,13 +58,14 @@ public class DefaultReportEntry
         this( source, name, null, message, stackTraceWriter, null );
     }
 
-    public DefaultReportEntry( String source, String name, String group, String message, StackTraceWriter stackTraceWriter )
+    public DefaultReportEntry( String source, String name, String group, String message,
+                               StackTraceWriter stackTraceWriter )
     {
         this( source, name, group, message, stackTraceWriter, null );
     }
 
-    public DefaultReportEntry( String source, String name, String group, String message, StackTraceWriter stackTraceWriter,
-                        Integer elapsed )
+    public DefaultReportEntry( String source, String name, String group, String message,
+                               StackTraceWriter stackTraceWriter, Integer elapsed )
     {
         if ( source == null )
         {
@@ -123,8 +125,8 @@ public class DefaultReportEntry
 
     public String toString()
     {
-        return "ReportEntry{" + "source='" + source + '\'' + ", name='" + name + '\'' + ", group='" + group + '\'' +
-            ", message='" + message + '\'' + ", stackTraceWriter=" + stackTraceWriter + ", elapsed=" + elapsed + '}';
+        return "ReportEntry{" + "source='" + source + '\'' + ", name='" + name + '\'' + ", group='" + group + '\''
+            + ", message='" + message + '\'' + ", stackTraceWriter=" + stackTraceWriter + ", elapsed=" + elapsed + '}';
     }
 
     public DefaultReportEntry( String source, String name, String message, Integer elapsed )

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/ReportEntry.java Fri Jan  7 17:34:39 2011
@@ -27,8 +27,6 @@ public interface ReportEntry
 
     public String getGroup();
 
-    public String getMessage();
-
     public StackTraceWriter getStackTraceWriter();
 
     public Integer getElapsed();

Copied: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java (from r1054768, maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java)
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java?p2=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java&p1=maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java&r1=1054768&r2=1056406&rev=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/DefaultReportEntry.java (original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/report/SimpleReportEntry.java Fri Jan  7 17:34:39 2011
@@ -22,48 +22,42 @@ package org.apache.maven.surefire.report
 /**
  * @author Kristian Rosenvold
  */
-public class DefaultReportEntry
+public class SimpleReportEntry
     implements ReportEntry
 {
     private final String source;
 
     private final String name;
 
-    private final String group;
-
-    private final String message;
-
     private final StackTraceWriter stackTraceWriter;
 
     private final Integer elapsed;
 
-    protected DefaultReportEntry( String name, String group )
+    public SimpleReportEntry( String source, String name )
     {
-        this.name = name;
-        this.group = group;
-        this.stackTraceWriter = null;
-        this.elapsed = null;
-        this.message = null;
-        this.source = null;
+        this( source, name, null, null );
     }
 
-    public DefaultReportEntry( String source, String name, String message )
+    public SimpleReportEntry( String source, String name, StackTraceWriter stackTraceWriter )
     {
-        this( source, name, null, message, null, null );
+        this( source, name, stackTraceWriter, null );
     }
 
-    public DefaultReportEntry( String source, String name, String message, StackTraceWriter stackTraceWriter )
+    public SimpleReportEntry( String source, String name, Integer elapsed )
     {
-        this( source, name, null, message, stackTraceWriter, null );
+        this( source, name, null, elapsed );
     }
 
-    public DefaultReportEntry( String source, String name, String group, String message, StackTraceWriter stackTraceWriter )
+    protected SimpleReportEntry( String name )
     {
-        this( source, name, group, message, stackTraceWriter, null );
+        this.name = name;
+        this.stackTraceWriter = null;
+        this.elapsed = null;
+        this.source = null;
     }
 
-    public DefaultReportEntry( String source, String name, String group, String message, StackTraceWriter stackTraceWriter,
-                        Integer elapsed )
+
+    public SimpleReportEntry( String source, String name, StackTraceWriter stackTraceWriter, Integer elapsed )
     {
         if ( source == null )
         {
@@ -73,24 +67,17 @@ public class DefaultReportEntry
         {
             throw new NullPointerException( "name is null" );
         }
-        if ( message == null )
-        {
-            throw new NullPointerException( "message is null" );
-        }
 
         this.source = source;
 
         this.name = name;
 
-        this.group = group;
-
-        this.message = message;
-
         this.stackTraceWriter = stackTraceWriter;
 
         this.elapsed = elapsed;
     }
 
+
     public String getSourceName()
     {
         return source;
@@ -103,12 +90,7 @@ public class DefaultReportEntry
 
     public String getGroup()
     {
-        return group;
-    }
-
-    public String getMessage()
-    {
-        return message;
+        return null;
     }
 
     public StackTraceWriter getStackTraceWriter()
@@ -123,32 +105,14 @@ public class DefaultReportEntry
 
     public String toString()
     {
-        return "ReportEntry{" + "source='" + source + '\'' + ", name='" + name + '\'' + ", group='" + group + '\'' +
-            ", message='" + message + '\'' + ", stackTraceWriter=" + stackTraceWriter + ", elapsed=" + elapsed + '}';
-    }
-
-    public DefaultReportEntry( String source, String name, String message, Integer elapsed )
-    {
-        this( source, name, null, message, null, elapsed );
-    }
-
-    public DefaultReportEntry( String source, String name, String group, String message )
-    {
-        this( source, name, group, message, null, null );
-    }
-
-    public DefaultReportEntry( String source, String name, String message, StackTraceWriter stackTraceWriter,
-                               Integer elapsed )
-    {
-        this( source, name, null, message, stackTraceWriter, elapsed );
+        return "ReportEntry{" + "source='" + source + '\'' + ", name='" + name + '\'' + ", stackTraceWriter="
+            + stackTraceWriter + ", elapsed=" + elapsed + '}';
     }
 
-    public static ReportEntry nameGroup( String name, String group )
-    {
-        return new DefaultReportEntry( name, group );
-    }
 
-    /** @noinspection RedundantIfStatement*/
+    /**
+     * @noinspection RedundantIfStatement
+     */
     public boolean equals( Object o )
     {
         if ( this == o )
@@ -160,20 +124,12 @@ public class DefaultReportEntry
             return false;
         }
 
-        DefaultReportEntry that = (DefaultReportEntry) o;
+        SimpleReportEntry that = (SimpleReportEntry) o;
 
         if ( elapsed != null ? !elapsed.equals( that.elapsed ) : that.elapsed != null )
         {
             return false;
         }
-        if ( group != null ? !group.equals( that.group ) : that.group != null )
-        {
-            return false;
-        }
-        if ( message != null ? !message.equals( that.message ) : that.message != null )
-        {
-            return false;
-        }
         if ( name != null ? !name.equals( that.name ) : that.name != null )
         {
             return false;
@@ -196,8 +152,6 @@ public class DefaultReportEntry
     {
         int result = source != null ? source.hashCode() : 0;
         result = 31 * result + ( name != null ? name.hashCode() : 0 );
-        result = 31 * result + ( group != null ? group.hashCode() : 0 );
-        result = 31 * result + ( message != null ? message.hashCode() : 0 );
         result = 31 * result + ( stackTraceWriter != null ? stackTraceWriter.hashCode() : 0 );
         result = 31 * result + ( elapsed != null ? elapsed.hashCode() : 0 );
         return result;

Modified: maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java (original)
+++ maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/AbstractConsoleReporterTestCase.java Fri Jan  7 17:34:39 2011
@@ -39,7 +39,7 @@ public abstract class AbstractConsoleRep
         throws Exception
     {
         super.setUp();
-        report = DefaultReportEntry.nameGroup( "name", "group" );
+        report = CategorizedReportEntry.nameGroup( "name", "group" );
     }
 
     protected void setConsoleReporter( AbstractConsoleReporter consoleReporter )
@@ -64,7 +64,7 @@ public abstract class AbstractConsoleRep
         String message = AbstractConsoleReporter.getTestSetStartingMessage( report );
         assertEquals( "Running name (of group)", message );
 
-        report = DefaultReportEntry.nameGroup( "name", null );
+        report = CategorizedReportEntry.nameGroup( "name", null );
 
         message = AbstractConsoleReporter.getTestSetStartingMessage( report );
         assertEquals( "Running name", message );

Modified: maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java (original)
+++ maven/surefire/trunk/surefire-api/src/test/java/org/apache/maven/surefire/report/XMLReporterTest.java Fri Jan  7 17:34:39 2011
@@ -39,8 +39,7 @@ public class XMLReporterTest
         super.setUp();
         reporter = new XMLReporter( ForkingConsoleReporterTest.getTestReporterConfiguration() );
         message = "junit.framework.AssertionFailedError";
-        reportEntry = new DefaultReportEntry( this.getClass().getName(), "XMLReporterTest", message,
-                                              new PojoStackTraceWriter( "", "", new AssertionFailedError() ) );
+        reportEntry = new SimpleReportEntry( this.getClass().getName(), "XMLReporterTest", new PojoStackTraceWriter( "", "", new AssertionFailedError() ) );
     }
 
     /*

Modified: maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/JUnit3Provider.java Fri Jan  7 17:34:39 2011
@@ -19,21 +19,19 @@ package org.apache.maven.surefire.junit;
  * under the License.
  */
 
-import org.apache.maven.surefire.Surefire;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
 import org.apache.maven.surefire.providerapi.SurefireProvider;
-import org.apache.maven.surefire.report.DefaultReportEntry;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.apache.maven.surefire.suite.RunResult;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.apache.maven.surefire.util.DirectoryScanner;
 import org.apache.maven.surefire.util.TestsToRun;
 
 import java.util.Iterator;
-import java.util.ResourceBundle;
 
 /**
  * @author Kristian Rosenvold
@@ -52,8 +50,6 @@ public class JUnit3Provider
 
     private TestsToRun testsToRun;
 
-    private static ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
-
     public JUnit3Provider( ProviderParameters booterParameters )
     {
         this.reporterFactory = booterParameters.getReporterFactory();
@@ -71,12 +67,12 @@ public class JUnit3Provider
             testsToRun = forkTestSet == null ? scanClassPath() : TestsToRun.fromClass( (Class) forkTestSet );
         }
 
-        for ( Iterator iter = testsToRun.iterator(); iter.hasNext();  )
+        for ( Iterator iter = testsToRun.iterator(); iter.hasNext(); )
         {
             Class clazz = (Class) iter.next();
             ReporterManager reporter = (ReporterManager) reporterFactory.createReporter();
-            SurefireTestSet surefireTestSet = createTestSet(  clazz );
-            executeTestSet( surefireTestSet, reporterFactory, testClassLoader);
+            SurefireTestSet surefireTestSet = createTestSet( clazz );
+            executeTestSet( surefireTestSet, reporterFactory, testClassLoader );
         }
 
         return reporterFactory.close();
@@ -86,8 +82,8 @@ public class JUnit3Provider
         throws TestSetFailedException
     {
         return jUnit3TestChecker.isJunit3Test( clazz )
-            ? new JUnitTestSet( clazz ) :
-            (SurefireTestSet) new PojoTestSet( clazz );
+            ? new JUnitTestSet( clazz )
+            : (SurefireTestSet) new PojoTestSet( clazz );
 
     }
 
@@ -98,17 +94,13 @@ public class JUnit3Provider
 
         ReporterManager reporterManager = (ReporterManager) reporterManagerFactory.createReporter();
 
-        String rawString = bundle.getString( "testSetStarting" );
-
-        ReportEntry report = new DefaultReportEntry( this.getClass().getName(), testSet.getName(), rawString );
+        ReportEntry report = new SimpleReportEntry( this.getClass().getName(), testSet.getName() );
 
         reporterManager.testSetStarting( report );
 
         testSet.execute( reporterManager, classLoader );
 
-        rawString = bundle.getString( "testSetCompletedNormally" );
-
-        report = new DefaultReportEntry( this.getClass().getName(), testSet.getName(), rawString );
+        report = new SimpleReportEntry( this.getClass().getName(), testSet.getName() );
 
         reporterManager.testSetCompleted( report );
 

Modified: maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/PojoTestSet.java Fri Jan  7 17:34:39 2011
@@ -19,25 +19,21 @@ package org.apache.maven.surefire.junit;
  * under the License.
  */
 
-import org.apache.maven.surefire.Surefire;
-import org.apache.maven.surefire.report.DefaultReportEntry;
 import org.apache.maven.surefire.report.PojoStackTraceWriter;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
-import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.ResourceBundle;
 
 public class PojoTestSet
     implements SurefireTestSet
 {
-    private ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
 
     private static final String TEST_METHOD_PREFIX = "test";
 
@@ -124,7 +120,7 @@ public class PojoTestSet
         userFriendlyMethodName += ')';
 
         ReportEntry report =
-            new DefaultReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ), getName() );
+            new SimpleReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ) );
 
         reportManager.testStarting( report );
 
@@ -134,18 +130,9 @@ public class PojoTestSet
         }
         catch ( Exception e )
         {
-            // Treat any exception from setUpFixture as a failure of the test.
-            String rawString = bundle.getString( "setupFixtureFailed" );
-
-            MessageFormat msgFmt = new MessageFormat( rawString );
-
-            Object[] stringArgs = { method.getName() };
-
-            String stringToPrint = msgFmt.format( stringArgs );
-
-            report = new DefaultReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ),
-                                             stringToPrint, new PojoStackTraceWriter( testObject.getClass().getName(),
-                                                                                      method.getName(), e ) );
+            report = new SimpleReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ),
+                                            new PojoStackTraceWriter( testObject.getClass().getName(), method.getName(),
+                                                                      e ) );
 
             reportManager.testFailed( report );
 
@@ -162,8 +149,7 @@ public class PojoTestSet
         {
             method.invoke( testObject, args );
 
-            report = new DefaultReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ),
-                                             getName() );
+            report = new SimpleReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ) );
 
             reportManager.testSucceeded( report );
         }
@@ -171,17 +157,9 @@ public class PojoTestSet
         {
             Throwable t = ite.getTargetException();
 
-            String msg = t.getMessage();
-
-            if ( msg == null )
-            {
-                msg = t.toString();
-            }
-
-            report =
-                new DefaultReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ), msg,
-                                        new PojoStackTraceWriter( testObject.getClass().getName(), method.getName(),
-                                                                  t ) );
+            report = new SimpleReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ),
+                                            new PojoStackTraceWriter( testObject.getClass().getName(), method.getName(),
+                                                                      t ) );
 
             reportManager.testFailed( report );
             // Don't return  here, because tearDownFixture should be called even
@@ -189,17 +167,9 @@ public class PojoTestSet
         }
         catch ( Throwable t )
         {
-            String msg = t.getMessage();
-
-            if ( msg == null )
-            {
-                msg = t.toString();
-            }
-
-            report =
-                new DefaultReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ), msg,
-                                        new PojoStackTraceWriter( testObject.getClass().getName(), method.getName(),
-                                                                  t ) );
+            report = new SimpleReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ),
+                                            new PojoStackTraceWriter( testObject.getClass().getName(), method.getName(),
+                                                                      t ) );
 
             reportManager.testFailed( report );
             // Don't return  here, because tearDownFixture should be called even
@@ -213,17 +183,9 @@ public class PojoTestSet
         catch ( Throwable t )
         {
             // Treat any exception from tearDownFixture as a failure of the test.
-            String rawString = bundle.getString( "cleanupFixtureFailed" );
-
-            MessageFormat msgFmt = new MessageFormat( rawString );
-
-            Object[] stringArgs = { method.getName() };
-
-            String stringToPrint = msgFmt.format( stringArgs );
-
-            report = new DefaultReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ),
-                                             stringToPrint, new PojoStackTraceWriter( testObject.getClass().getName(),
-                                                                                      method.getName(), t ) );
+            report = new SimpleReportEntry( testObject.getClass().getName(), getTestName( userFriendlyMethodName ),
+                                            new PojoStackTraceWriter( testObject.getClass().getName(), method.getName(),
+                                                                      t ) );
 
             reportManager.testFailed( report );
 

Modified: maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit/src/main/java/org/apache/maven/surefire/junit/TestListenerInvocationHandler.java Fri Jan  7 17:34:39 2011
@@ -19,9 +19,9 @@ package org.apache.maven.surefire.junit;
  * under the License.
  */
 
-import org.apache.maven.surefire.report.DefaultReportEntry;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.report.SimpleReportEntry;
 
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.InvocationTargetException;
@@ -152,8 +152,7 @@ public class TestListenerInvocationHandl
     // Handler for TestListener.startTest(Test)
     public void handleStartTest( Object[] args )
     {
-        ReportEntry report =
-            new DefaultReportEntry( args[0].getClass().getName(), args[0].toString(), args[0].getClass().getName() );
+        ReportEntry report = new SimpleReportEntry( args[0].getClass().getName(), args[0].toString() );
 
         reportManager.testStarting( report );
     }
@@ -163,8 +162,7 @@ public class TestListenerInvocationHandl
         throws IllegalAccessException, InvocationTargetException
     {
         ReportEntry report =
-            new DefaultReportEntry( args[0].getClass().getName(), args[0].toString(), args[1].toString(),
-                                    getStackTraceWriter( args ) );
+            new SimpleReportEntry( args[0].getClass().getName(), args[0].toString(), getStackTraceWriter( args ) );
 
         reportManager.testError( report );
 
@@ -193,8 +191,7 @@ public class TestListenerInvocationHandl
         throws IllegalAccessException, InvocationTargetException
     {
         ReportEntry report =
-            new DefaultReportEntry( args[0].getClass().getName(), args[0].toString(), args[1].toString(),
-                                    getStackTraceWriter( args ) );
+            new SimpleReportEntry( args[0].getClass().getName(), args[0].toString(), getStackTraceWriter( args ) );
 
         reportManager.testFailed( report );
 
@@ -207,8 +204,7 @@ public class TestListenerInvocationHandl
 
         if ( !testHadFailed )
         {
-            ReportEntry report = new DefaultReportEntry( args[0].getClass().getName(), args[0].toString(),
-                                                         args[0].getClass().getName() );
+            ReportEntry report = new SimpleReportEntry( args[0].getClass().getName(), args[0].toString() );
 
             reportManager.testSucceeded( report );
         }

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=1056406&r1=1056405&r2=1056406&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 Fri Jan  7 17:34:39 2011
@@ -22,11 +22,11 @@ package org.apache.maven.surefire.junit4
 import org.apache.maven.surefire.Surefire;
 import org.apache.maven.surefire.providerapi.ProviderParameters;
 import org.apache.maven.surefire.providerapi.SurefireProvider;
-import org.apache.maven.surefire.report.DefaultReportEntry;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.apache.maven.surefire.suite.RunResult;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.apache.maven.surefire.util.DefaultDirectoryScanner;
@@ -137,17 +137,13 @@ public class JUnit4Provider
         throws ReporterException, TestSetFailedException
     {
 
-        String rawString = bundle.getString( "testSetStarting" );
-
-        ReportEntry report = new DefaultReportEntry( this.getClass().getName(), clazz.getName(), rawString );
+        ReportEntry report = new SimpleReportEntry( this.getClass().getName(), clazz.getName() );
 
         reporter.testSetStarting( report );
 
         JUnit4TestSet.execute( clazz, listeners );
 
-        rawString = bundle.getString( "testSetCompletedNormally" );
-
-        report = new DefaultReportEntry( this.getClass().getName(), clazz.getName(), rawString );
+        report = new SimpleReportEntry( this.getClass().getName(), clazz.getName() );
 
         reporter.testSetCompleted( report );
 

Modified: maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java?rev=1056406&r1=1056405&r2=1056406&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java (original)
+++ maven/surefire/trunk/surefire-providers/surefire-junit4/src/main/java/org/apache/maven/surefire/junit4/JUnit4TestSetReporter.java Fri Jan  7 17:34:39 2011
@@ -19,25 +19,20 @@ package org.apache.maven.surefire.junit4
  * under the License.
  */
 
-import java.util.ResourceBundle;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.maven.surefire.Surefire;
-import org.apache.maven.surefire.report.DefaultReportEntry;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterManager;
+import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.junit.runner.Description;
 import org.junit.runner.Result;
 import org.junit.runner.notification.Failure;
 import org.junit.runner.notification.RunListener;
 
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 public class JUnit4TestSetReporter
     extends RunListener
 {
-    // Constants
-    private static ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
-
     // Member Variables
     private Class testSet;
 
@@ -70,8 +65,7 @@ public class JUnit4TestSetReporter
     public void testRunStarted( Description description )
         throws Exception
     {
-        String rawString = bundle.getString( "testSetStarting" );
-        ReportEntry report = new DefaultReportEntry( testSet.getName(), testSet.getName(), rawString );
+        ReportEntry report = new SimpleReportEntry( testSet.getName(), testSet.getName() );
 
         this.reportMgr.testSetStarting( report );
     }
@@ -84,8 +78,7 @@ public class JUnit4TestSetReporter
     public void testRunFinished( Result result )
         throws Exception
     {
-        String rawString = bundle.getString( "testSetCompletedNormally" );
-        ReportEntry report = new DefaultReportEntry( testSet.getName(), testSet.getName(), rawString );
+        ReportEntry report = new SimpleReportEntry( testSet.getName(), testSet.getName() );
 
         this.reportMgr.testSetCompleted( report );
         this.reportMgr.reset();
@@ -99,9 +92,7 @@ public class JUnit4TestSetReporter
     public void testIgnored( Description description )
         throws Exception
     {
-        String rawString = bundle.getString( "testSkipped" );
-        ReportEntry report =
-            new DefaultReportEntry( extractClassName( description ), description.getDisplayName(), rawString );
+        ReportEntry report = new SimpleReportEntry( extractClassName( description ), description.getDisplayName() );
 
         this.reportMgr.testSkipped( report );
     }
@@ -114,9 +105,7 @@ public class JUnit4TestSetReporter
     public void testStarted( Description description )
         throws Exception
     {
-        String rawString = bundle.getString( "testStarting" );
-        ReportEntry report =
-            new DefaultReportEntry( extractClassName( description ), description.getDisplayName(), rawString );
+        ReportEntry report = new SimpleReportEntry( extractClassName( description ), description.getDisplayName() );
 
         this.reportMgr.testStarting( report );
 
@@ -132,10 +121,9 @@ public class JUnit4TestSetReporter
     public void testFailure( Failure failure )
         throws Exception
     {
-        String rawString = bundle.getString( "executeException" );
         ReportEntry report =
-            new DefaultReportEntry( extractClassName( failure.getDescription() ), failure.getTestHeader(), rawString,
-                                    new JUnit4StackTraceWriter( failure ) );
+            new SimpleReportEntry( extractClassName( failure.getDescription() ), failure.getTestHeader(),
+                                   new JUnit4StackTraceWriter( failure ) );
 
         if ( failure.getException() instanceof AssertionError )
         {
@@ -159,9 +147,7 @@ public class JUnit4TestSetReporter
     {
         if ( !failureFlag )
         {
-            String rawString = bundle.getString( "testSuccessful" );
-            ReportEntry report =
-                new DefaultReportEntry( extractClassName( description ), description.getDisplayName(), rawString );
+            ReportEntry report = new SimpleReportEntry( extractClassName( description ), description.getDisplayName() );
 
             this.reportMgr.testSucceeded( report );
         }

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=1056406&r1=1056405&r2=1056406&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 Fri Jan  7 17:34:39 2011
@@ -20,9 +20,9 @@ package org.apache.maven.surefire.junitc
  */
 
 import org.apache.maven.surefire.Surefire;
-import org.apache.maven.surefire.report.DefaultReportEntry;
 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;
 
@@ -50,8 +50,6 @@ class TestMethod
 
     private volatile Description ignored;
 
-    private static final ResourceBundle BUNDLE = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
-
     private static final InheritableThreadLocal<TestMethod> TEST_METHOD = new InheritableThreadLocal<TestMethod>();
 
     private volatile LogicalStream output;
@@ -108,18 +106,18 @@ class TestMethod
 
         if ( ignored != null )
         {
-            reporter.testSkipped( createReportEntry( "testSkipped" ) );
+            reporter.testSkipped( createReportEntry() );
             return;
         }
 
-        reporter.testStarting( createReportEntry( "testStarting" ) );
+        reporter.testStarting( createReportEntry() );
         if ( output != null )
         {
             output.writeDetails( reporter );
         }
         if ( testFailure != null )
         {
-            ReportEntry report = createFailureEntry( testFailure, "executeException" );
+            ReportEntry report = createFailureEntry( testFailure );
             //noinspection ThrowableResultOfMethodCallIgnored
             if ( testFailure.getException() instanceof AssertionError )
             {
@@ -137,23 +135,20 @@ class TestMethod
         }
         else
         {
-            reporter.testSucceeded( createReportEntry( "testSuccessful" ) );
+            reporter.testSucceeded( createReportEntry() );
         }
     }
 
-    private ReportEntry createReportEntry( String rawString2 )
+    private ReportEntry createReportEntry()
     {
-        String rawString = BUNDLE.getString( rawString2 );
-        return new DefaultReportEntry( description.getTestClass().getCanonicalName(), description.getDisplayName(),
-                                       rawString, getElapsed() );
+        return new SimpleReportEntry( description.getTestClass().getCanonicalName(), description.getDisplayName(),
+                                      getElapsed() );
     }
 
-    private ReportEntry createFailureEntry( Failure failure, String rawString2 )
+    private ReportEntry createFailureEntry( Failure failure )
     {
-        String rawString = BUNDLE.getString( rawString2 );
-        return new DefaultReportEntry( failure.getDescription().getTestClass().getCanonicalName(),
-                                       failure.getTestHeader(), rawString, new JUnitCoreStackTraceWriter( failure ),
-                                       getElapsed() );
+        return new SimpleReportEntry( failure.getDescription().getTestClass().getCanonicalName(),
+                                      failure.getTestHeader(), new JUnitCoreStackTraceWriter( failure ), getElapsed() );
     }
 
 

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=1056406&r1=1056405&r2=1056406&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 Fri Jan  7 17:34:39 2011
@@ -20,9 +20,9 @@ package org.apache.maven.surefire.junitc
  */
 
 import org.apache.maven.surefire.Surefire;
-import org.apache.maven.surefire.report.DefaultReportEntry;
 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 java.util.ArrayList;
@@ -37,8 +37,6 @@ import java.util.concurrent.atomic.Atomi
  */
 public class TestSet
 {
-    private static final ResourceBundle BUNDLE = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
-
     private final Description testSetDescription;
 
     private AtomicInteger numberOfCompletedChildren = new AtomicInteger( 0 );
@@ -105,11 +103,10 @@ public class TestSet
 
     private ReportEntry createReportEntry( String rawString2, Integer elapsed )
     {
-        String rawString = BUNDLE.getString( rawString2 );
         boolean isJunit3 = testSetDescription.getTestClass() == null;
         String classNameToUse =
             isJunit3 ? testSetDescription.getChildren().get( 0 ).getClassName() : testSetDescription.getClassName();
-        return new DefaultReportEntry( classNameToUse, classNameToUse, rawString, elapsed );
+        return new SimpleReportEntry( classNameToUse, classNameToUse, elapsed );
     }
 
     public void incrementTestMethodCount()

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=1056406&r1=1056405&r2=1056406&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 Fri Jan  7 17:34:39 2011
@@ -22,13 +22,12 @@ 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.Surefire;
-import org.apache.maven.surefire.report.DefaultReportEntry;
 import org.apache.maven.surefire.report.ReportEntry;
 import org.apache.maven.surefire.report.ReporterException;
 import org.apache.maven.surefire.report.ReporterFactory;
 import org.apache.maven.surefire.report.ReporterManager;
 import org.apache.maven.surefire.report.ReporterManagerFactory;
+import org.apache.maven.surefire.report.SimpleReportEntry;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.apache.maven.surefire.util.DefaultDirectoryScanner;
 import org.apache.maven.surefire.util.DirectoryScanner;
@@ -42,7 +41,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import java.util.ResourceBundle;
 import java.util.SortedMap;
 import java.util.TreeMap;
 
@@ -55,8 +53,6 @@ import java.util.TreeMap;
 public class TestNGDirectoryTestSuite
     implements TestNgTestSuite
 {
-    protected static ResourceBundle bundle = ResourceBundle.getBundle( Surefire.SUREFIRE_BUNDLE_NAME );
-
     private ArtifactVersion version;
 
     private Map options;
@@ -79,8 +75,7 @@ public class TestNGDirectoryTestSuite
     public TestNGDirectoryTestSuite( File basedir, List includes, List excludes, String testSourceDirectory,
                                      ArtifactVersion artifactVersion, Map confOptions, File reportsDirectory )
     {
-        this.surefireDirectoryScanner = new DefaultDirectoryScanner( basedir, includes, excludes,
-                                                                     "filesystem" );
+        this.surefireDirectoryScanner = new DefaultDirectoryScanner( basedir, includes, excludes, "filesystem" );
 
         this.options = confOptions;
 
@@ -156,7 +151,8 @@ public class TestNGDirectoryTestSuite
 
         Class[] testClasses = (Class[]) testNgTestClasses.toArray( new Class[testNgTestClasses.size()] );
 
-        TestNGExecutor.run( testClasses, this.testSourceDirectory, this.options, this.version, reporterManager, this, testNgReportsDirectory );
+        TestNGExecutor.run( testClasses, this.testSourceDirectory, this.options, this.version, reporterManager, this,
+                            testNgReportsDirectory );
 
         if ( junitTestClasses.size() > 0 )
         {
@@ -171,7 +167,8 @@ public class TestNGDirectoryTestSuite
 
             junitOptions.put( "junit", Boolean.TRUE );
 
-            TestNGExecutor.run( testClasses, this.testSourceDirectory, junitOptions, this.version, reporterManager, this, junitReportsDirectory );
+            TestNGExecutor.run( testClasses, this.testSourceDirectory, junitOptions, this.version, reporterManager,
+                                this, junitReportsDirectory );
         }
 
         finishTestSuite( reporterManager, this );
@@ -203,9 +200,7 @@ public class TestNGDirectoryTestSuite
 
     public static void startTestSuite( ReporterManager reporterManager, Object suite )
     {
-        String rawString = bundle.getString( "testSetStarting" );
-
-        ReportEntry report = new DefaultReportEntry( suite.getClass().getName(), getSuiteName( suite ), rawString );
+        ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );
 
         try
         {
@@ -219,9 +214,7 @@ public class TestNGDirectoryTestSuite
 
     public static void finishTestSuite( ReporterManager reporterManager, Object suite )
     {
-        String rawString = bundle.getString( "testSetCompletedNormally" );
-
-        ReportEntry report = new DefaultReportEntry( suite.getClass().getName(), getSuiteName( suite ), rawString );
+        ReportEntry report = new SimpleReportEntry( suite.getClass().getName(), getSuiteName( suite ) );
 
         reporterManager.testSetCompleted( report );
 

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=1056406&r1=1056405&r2=1056406&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 Fri Jan  7 17:34:39 2011
@@ -19,18 +19,11 @@ package org.apache.maven.surefire.testng
  * under the License.
  */
 
-import java.util.ResourceBundle;
-
 import org.apache.maven.surefire.Surefire;
-import org.apache.maven.surefire.report.DefaultReportEntry;
-import org.apache.maven.surefire.report.PojoStackTraceWriter;
-import org.apache.maven.surefire.report.ReportEntry;
-import org.apache.maven.surefire.report.ReporterManager;
-import org.testng.ISuite;
-import org.testng.ISuiteListener;
-import org.testng.ITestContext;
-import org.testng.ITestListener;
-import org.testng.ITestResult;
+import org.apache.maven.surefire.report.*;
+import org.testng.*;
+
+import java.util.ResourceBundle;
 
 /**
  * Listens for and provides and adaptor layer so that
@@ -38,6 +31,7 @@ import org.testng.ITestResult;
  * {@link org.apache.maven.surefire.report.ReporterManager}.
  *
  * @author jkuhnert
+ * @noinspection ThrowableResultOfMethodCallIgnored
  */
 public class TestNGReporter
     implements ITestListener, ISuiteListener
@@ -75,8 +69,7 @@ public class TestNGReporter
         String rawString = bundle.getString( "testStarting" );
         String group = groupString( result.getMethod().getGroups(), result.getTestClass().getName() );
         ReportEntry report =
-            new DefaultReportEntry( getSource( result ), getUserFriendlyTestName( result ), group, rawString );
-
+            new CategorizedReportEntry( getSource( result ), getUserFriendlyTestName( result ), group, rawString );
         reportManager.testStarting( report );
     }
 
@@ -87,19 +80,16 @@ public class TestNGReporter
 
     public void onTestSuccess( ITestResult result )
     {
-        ReportEntry report = new DefaultReportEntry( getSource( result ), getUserFriendlyTestName( result ),
-                                                     bundle.getString( "testSuccessful" ) );
+        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ) );
         reportManager.testSucceeded( report );
     }
 
     public void onTestFailure( ITestResult result )
     {
-        String rawString = bundle.getString( "executeException" );
-
-        ReportEntry report = new DefaultReportEntry( getSource( result ), getUserFriendlyTestName( result ), rawString,
-                                                     new PojoStackTraceWriter(
-                                                         result.getTestClass().getRealClass().getName(),
-                                                         result.getMethod().getMethodName(), result.getThrowable() ) );
+        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ),
+                                                    new PojoStackTraceWriter(
+                                                        result.getTestClass().getRealClass().getName(),
+                                                        result.getMethod().getMethodName(), result.getThrowable() ) );
 
         reportManager.testFailed( report );
     }
@@ -112,20 +102,17 @@ public class TestNGReporter
 
     public void onTestSkipped( ITestResult result )
     {
-        ReportEntry report = new DefaultReportEntry( getSource( result ), getUserFriendlyTestName( result ),
-                                                     bundle.getString( "testSkipped" ) );
+        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ) );
 
         reportManager.testSkipped( report );
     }
 
     public void onTestFailedButWithinSuccessPercentage( ITestResult result )
     {
-        String rawString = bundle.getString( "executeException" );
-
-        ReportEntry report = new DefaultReportEntry( getSource( result ), getUserFriendlyTestName( result ), rawString,
-                                                     new PojoStackTraceWriter(
-                                                         result.getTestClass().getRealClass().getName(),
-                                                         result.getMethod().getMethodName(), result.getThrowable() ) );
+        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ),
+                                                    new PojoStackTraceWriter(
+                                                        result.getTestClass().getRealClass().getName(),
+                                                        result.getMethod().getMethodName(), result.getThrowable() ) );
 
         reportManager.testError( report );
     }
@@ -155,8 +142,9 @@ public class TestNGReporter
      * Creates a string out of the list of testng groups in the
      * form of <pre>"group1,group2,group3"</pre>.
      *
-     * @param groups
-     * @param defaultValue
+     * @param groups The groups being run
+     * @param defaultValue The default to use if no groups
+     * @return a string describing the groups
      */
     private static String groupString( String[] groups, String defaultValue )
     {



Mime
View raw message