Code example for Attributes

Methods: get

0
        assertTrue(attr.size() >= 0);
    } 
 
    public void test_getLjava_lang_Object_true() { 
        assertEquals("a) Incorrect value returned", "one", a
                .get(new Attributes.Name("1")));
        assertNull("b) Incorrect value returned", a.get("0"));
        assertNull("b) Incorrect value returned", a.get("1"));
    } 
 
    public void test_getValueLjava_util_jar_Attributes_Name() { 
        assertEquals("a) Incorrect value returned", "one", a
                .getValue(new Attributes.Name("1")));
        assertNull("b) Incorrect value returned", a
                .getValue(new Attributes.Name("0")));
    } 
 
    public void test_hashCode() { 
        Attributes b = (Attributes) a.clone();
        b.putValue("33", "Thirty three");
        assertNotSame(a.hashCode(), b.hashCode());