logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1563296 - /logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java
Date Fri, 31 Jan 2014 22:14:50 GMT
Author: ggregory
Date: Fri Jan 31 22:14:50 2014
New Revision: 1563296

URL: http://svn.apache.org/r1563296
Log:
Simplify.

Modified:
    logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java

Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java?rev=1563296&r1=1563295&r2=1563296&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/message/LocalizedMessageTest.java
Fri Jan 31 22:14:50 2014
@@ -20,31 +20,25 @@ import org.junit.Test;
 
 import java.util.Locale;
 
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
 
 /**
- *
+ * Tests LocalizedMessage.
  */
 public class LocalizedMessageTest {
 
     private static final int LOOP_CNT = 500;
     String[] array = new String[LOOP_CNT];
 
-
     @Test
     public void testMessageFormat() {
-        final LocalizedMessage msg = new LocalizedMessage("MF", new Locale("en", "US"), "msg1",
new Object[] {"1", "Test"});
-        final String result = msg.getFormattedMessage();
-        final String expected = "This is test number 1 with string argument Test.";
-        assertTrue(expected.equals(result));
+        final LocalizedMessage msg = new LocalizedMessage("MF", new Locale("en", "US"), "msg1",
new Object[] { "1", "Test" });
+        assertEquals("This is test number 1 with string argument Test.", msg.getFormattedMessage());
     }
 
-
     @Test
     public void testStringFormat() {
-        final LocalizedMessage msg = new LocalizedMessage("SF", new Locale("en", "US"), "msg1",
new Object[] {"1", "Test"});
-        final String result = msg.getFormattedMessage();
-        final String expected = "This is test number 1 with string argument Test.";
-        assertTrue(expected.equals(result));
+        final LocalizedMessage msg = new LocalizedMessage("SF", new Locale("en", "US"), "msg1",
new Object[] { "1", "Test" });
+        assertEquals("This is test number 1 with string argument Test.", msg.getFormattedMessage());
     }
 }



Mime
View raw message