Code example for PropertyChangeEvent

Methods: getNewValue, getOldValue, getPropagationId, getPropertyName, getSource

0
    /* 
     * Test the constructor with null parameters except the source parameter. 
     */ 
    public void testConstructor_Null() { 
        Object src = new Object();
        PropertyChangeEvent event = new PropertyChangeEvent(src, null, null,
                null); 
        assertSame(src, event.getSource());
        assertNull(event.getPropertyName());
        assertSame(null, event.getOldValue());
        assertSame(null, event.getNewValue());
        assertNull(event.getPropagationId());
    } 
 
    /* 
     * Test the constructor with null properties but non-null old and new 
     * values. 
     */ 
    public void testConstructor_NullProperty() { 
        Object src = new Object();
        Object oldValue = new Object();