You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kr...@apache.org on 2012/08/16 18:38:35 UTC

svn commit: r1373909 [2/2] - in /maven/surefire/trunk: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/ maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/booterclient/output/ maven-surefire-common/src/main/java/o...

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=1373909&r1=1373908&r2=1373909&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 Thu Aug 16 16:38:34 2012
@@ -96,10 +96,11 @@ public class TestNGReporter
 
     public void onTestFailure( ITestResult result )
     {
-        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ),
-                                                    new PojoStackTraceWriter(
-                                                        result.getTestClass().getRealClass().getName(),
-                                                        result.getMethod().getMethodName(), result.getThrowable() ) );
+        ReportEntry report = SimpleReportEntry.withException( getSource( result ), getUserFriendlyTestName( result ),
+                                                              new PojoStackTraceWriter(
+                                                                  result.getTestClass().getRealClass().getName(),
+                                                                  result.getMethod().getMethodName(),
+                                                                  result.getThrowable() ) );
 
         reporter.testFailed( report );
     }
@@ -119,10 +120,11 @@ public class TestNGReporter
 
     public void onTestFailedButWithinSuccessPercentage( ITestResult result )
     {
-        ReportEntry report = new SimpleReportEntry( getSource( result ), getUserFriendlyTestName( result ),
-                                                    new PojoStackTraceWriter(
-                                                        result.getTestClass().getRealClass().getName(),
-                                                        result.getMethod().getMethodName(), result.getThrowable() ) );
+        ReportEntry report = SimpleReportEntry.withException( getSource( result ), getUserFriendlyTestName( result ),
+                                                              new PojoStackTraceWriter(
+                                                                  result.getTestClass().getRealClass().getName(),
+                                                                  result.getMethod().getMethodName(),
+                                                                  result.getThrowable() ) );
 
         reporter.testError( report );
     }