Adding toString test. LANG-588
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@916099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
88d44051a1
commit
90f45b447a
|
@ -62,6 +62,14 @@ public void testHashCode() throws Exception {
|
||||||
assertEquals(Pair.of(null, "foo").hashCode(), Pair.of(null, "foo").hashCode());
|
assertEquals(Pair.of(null, "foo").hashCode(), Pair.of(null, "foo").hashCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@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
|
@Test
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void testSerialization() throws Exception {
|
public void testSerialization() throws Exception {
|
||||||
|
|
Loading…
Reference in New Issue