commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r916099 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/PairTest.java
Date Thu, 25 Feb 2010 03:11:49 GMT
Author: bayard
Date: Thu Feb 25 03:11:48 2010
New Revision: 916099

URL: http://svn.apache.org/viewvc?rev=916099&view=rev
Log:
Adding toString test. LANG-588

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=916099&r1=916098&r2=916099&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 Thu Feb
25 03:11:48 2010
@@ -63,6 +63,14 @@
     }
 
     @Test
+    public void testToString() throws Exception {
+        assertEquals("(null,null)", Pair.of(null, null).toString());
+        assertEquals("(null,two)", Pair.of(null, "two").toString());
+        assertEquals("(one,null)", Pair.of("one", null).toString());
+        assertEquals("(one,two)", Pair.of("one", "two").toString());
+    }
+
+    @Test
     @SuppressWarnings("unchecked")
     public void testSerialization() throws Exception {
         Pair<Integer, String> origPair = Pair.of(0, "foo");



Mime
View raw message