commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1091346 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math/exception/TooManyEvaluationsExceptionTest.java
Date Tue, 12 Apr 2011 09:41:02 GMT
Author: erans
Date: Tue Apr 12 09:41:02 2011
New Revision: 1091346

URL: http://svn.apache.org/viewvc?rev=1091346&view=rev
Log:
Simplified test.

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math/exception/TooManyEvaluationsExceptionTest.java

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/exception/TooManyEvaluationsExceptionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/exception/TooManyEvaluationsExceptionTest.java?rev=1091346&r1=1091345&r2=1091346&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math/exception/TooManyEvaluationsExceptionTest.java
(original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/exception/TooManyEvaluationsExceptionTest.java
Tue Apr 12 09:41:02 2011
@@ -17,7 +17,6 @@
 package org.apache.commons.math.exception;
 
 import java.text.MessageFormat;
-import java.util.Locale;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -32,13 +31,10 @@ public class TooManyEvaluationsException
     public void testMessage() {
         final int max = 12345;
         final TooManyEvaluationsException e = new TooManyEvaluationsException(max);
-        final String msg = e.getMessage();
-        final MessageFormat usFormat = new MessageFormat("{0}", Locale.US);
+        final String msg = e.getLocalizedMessage();
         Assert.assertTrue(msg,
                           msg.matches(".*?" +
-                                      usFormat.format(new Object[] {max},
-                                                      new StringBuffer(),
-                                                      null) +
+                                      MessageFormat.format("{0}", max) +
                                       ".*"));
     }
 }



Mime
View raw message