Code example for WeakHashMap

Methods: putAll, size

0
    public void test_containsValueLjava_lang_Object() { 
        // Test for method boolean java.util.WeakHashMap.containsValue() 
        whm = new WeakHashMap();
        for (int i = 0; i < 100; i++)
            whm.put(keyArray[i], valueArray[i]);
        for (int i = 0; i < 100; i++)
            assertTrue("Should contain referenced value", whm
                    .containsValue(valueArray[i]));
        keyArray[25] = null;
        keyArray[50] = null;
    } 
 
    /** 
     * @tests java.util.WeakHashMap#entrySet() 
     */ 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "entrySet", 
        args = {} 
    )