Code example for Hashtable

Methods: containsKey

0
     */ 
    public void test_containsKeyLjava_lang_Object() { 
        // Test for method boolean 
        // java.util.Hashtable.containsKey(java.lang.Object) 
 
        assertTrue("Failed to find key", htfull.containsKey("FKey 4"));
        assertTrue("Failed to find key", !htfull.containsKey("FKey 99"));
 
        try { 
            htfull.containsKey(null);
            fail("NullPointerException expected");
        } catch (NullPointerException e) {
            //expected 
        } 
    } 
 
    /** 
     * java.util.Hashtable#containsValue(java.lang.Object) 
     */ 
    public void test_containsValueLjava_lang_Object() { 
        // Test for method boolean