1 16 package org.apache.commons.collections.map; 17 18 import java.util.Map ; 19 20 import junit.framework.Test; 21 import junit.textui.TestRunner; 22 23 import org.apache.commons.collections.BulkTest; 24 25 32 public class TestHashedMap extends AbstractTestIterableMap { 33 34 public TestHashedMap(String testName) { 35 super(testName); 36 } 37 38 public static void main(String [] args) { 39 TestRunner.run(suite()); 40 } 41 42 public static Test suite() { 43 return BulkTest.makeSuite(TestHashedMap.class); 44 } 45 46 public Map makeEmptyMap() { 47 return new HashedMap(); 48 } 49 50 public String getCompatibilityVersion() { 51 return "3"; 52 } 53 54 public void testClone() { 55 HashedMap map = new HashedMap(10); 56 map.put("1", "1"); 57 Map cloned = (Map ) map.clone(); 58 assertEquals(map.size(), cloned.size()); 59 assertSame(map.get("1"), cloned.get("1")); 60 } 61 62 } 69 | Popular Tags |