Add extra test case to clarify bug 30408
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131814 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
228637706a
commit
ee2a47a0ef
|
@ -50,7 +50,7 @@ import org.apache.commons.collections.collection.UnmodifiableCollection;
|
||||||
* @author Phil Steitz
|
* @author Phil Steitz
|
||||||
* @author Steven Melzer
|
* @author Steven Melzer
|
||||||
*
|
*
|
||||||
* @version $Revision: 1.40 $ $Date: 2004/07/17 21:38:33 $
|
* @version $Revision: 1.41 $ $Date: 2004/08/03 18:20:41 $
|
||||||
*/
|
*/
|
||||||
public class TestCollectionUtils extends TestCase {
|
public class TestCollectionUtils extends TestCase {
|
||||||
|
|
||||||
|
@ -1160,6 +1160,17 @@ public class TestCollectionUtils extends TestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testTransformedCollection_2() {
|
||||||
|
List list = new ArrayList();
|
||||||
|
list.add("1");
|
||||||
|
list.add("2");
|
||||||
|
list.add("3");
|
||||||
|
Collection result = CollectionUtils.transformedCollection(list, TRANSFORM_TO_INTEGER);
|
||||||
|
assertEquals(true, result.contains("1")); // untransformed
|
||||||
|
assertEquals(true, result.contains("2")); // untransformed
|
||||||
|
assertEquals(true, result.contains("3")); // untransformed
|
||||||
|
}
|
||||||
|
|
||||||
public void testSynchronizedCollection() {
|
public void testSynchronizedCollection() {
|
||||||
Collection col = CollectionUtils.synchronizedCollection(new ArrayList());
|
Collection col = CollectionUtils.synchronizedCollection(new ArrayList());
|
||||||
assertTrue("Returned object should be a SynchronizedCollection.",
|
assertTrue("Returned object should be a SynchronizedCollection.",
|
||||||
|
|
Loading…
Reference in New Issue