Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 37100 invoked from network); 12 Apr 2011 09:41:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 09:41:26 -0000 Received: (qmail 18730 invoked by uid 500); 12 Apr 2011 09:41:26 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 18657 invoked by uid 500); 12 Apr 2011 09:41:26 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 18649 invoked by uid 99); 12 Apr 2011 09:41:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 09:41:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 09:41:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C309C2388A38; Tue, 12 Apr 2011 09:41:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: erans@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110412094102.C309C2388A38@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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) + ".*")); } }