Code example for Attributes

Methods: putValue

0
public class AttributesTest extends TestCase {
    private Attributes a;
 
    @Override 
    protected void setUp() { 
        a = new Attributes();
        a.putValue("1", "one");
        a.putValue("2", "two");
        a.putValue("3", "three");
        a.putValue("4", "four");
    } 
 
    /** 
     * @tests java.util.jar.Attributes#Attributes(java.util.jar.Attributes) 
     */ 
    public void test_ConstructorLjava_util_jar_Attributes() { 
        Attributes a2 = new Attributes(a);
        assertEquals(a, a2);
        a.putValue("1", "one(1)");
        assertTrue("equal", !a.equals(a2));
    }