You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2011/04/11 15:53:29 UTC

svn commit: r1091075 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/PairTest.java

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());
+    }
 }