commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1091075 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/PairTest.java
Date Mon, 11 Apr 2011 13:53:29 GMT
Author: ggregory
Date: Mon Apr 11 13:53:29 2011
New Revision: 1091075

URL: http://svn.apache.org/viewvc?rev=1091075&view=rev
Log:
Add a test for default toString behavior.

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/PairTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/PairTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/PairTest.java?rev=1091075&r1=1091074&r2=1091075&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/PairTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/PairTest.java Mon Apr
11 13:53:29 2011
@@ -57,4 +57,10 @@ public class PairTest {
         assertFalse(pair.equals(pair2));
         assertFalse(pair.hashCode() == pair2.hashCode());
     }
+
+    @Test
+    public void testToString() throws Exception {
+        Pair<String, String> pair = Pair.of("Key", "Value");
+        assertEquals("ImmutablePair(Key,Value)", pair.toString());
+    }
 }



Mime
View raw message