Add some tests for toString
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1477781 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b7430de759
commit
5d83e4deb8
|
@ -425,4 +425,24 @@ public class Flat3MapTest<K, V> extends AbstractIterableMapTest<K, V> {
|
|||
assertEquals( Integer.valueOf(0), m.remove( Integer.valueOf(0) ) );
|
||||
}
|
||||
|
||||
public void testToString() {
|
||||
final Flat3Map<Integer, Integer> m = new Flat3Map<Integer, Integer>();
|
||||
final String string0 = m.toString();
|
||||
assertNotNull(string0);
|
||||
m.put( Integer.valueOf(1), Integer.valueOf(1) );
|
||||
final String string1 = m.toString();
|
||||
assertNotNull(string1);
|
||||
assertNotSame(string0, string1);
|
||||
m.put( Integer.valueOf(0), Integer.valueOf(0) );
|
||||
final String string2 = m.toString();
|
||||
assertNotNull(string2);
|
||||
assertNotSame(string0, string2);
|
||||
assertNotSame(string1, string2);
|
||||
m.put( Integer.valueOf(2), Integer.valueOf(2) );
|
||||
final String string3 = m.toString();
|
||||
assertNotNull(string3);
|
||||
assertNotSame(string0, string3);
|
||||
assertNotSame(string1, string3);
|
||||
assertNotSame(string2, string3);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue