Code example for PropertyChangeEvent

Methods: getNewValue, getOldValue, getPropertyName, getSource

0
        if (count >= 0) {
            msg += " (event number " + count + ")";
        } 
        Object expectedObject = null;
        Object actualObject = null;
        expectedObject = expected.getSource();
        actualObject = actual.getSource();
        if (!equivelentObjects(expectedObject, actualObject)) {
            ok = false;
            msg += "\n\tExpected source= " + expectedObject + "; "
                + " Actual source=" + actualObject;
        } else { 
            msg += "\n\tSource= " + actualObject;
        } 
        expectedObject = expected.getPropertyName();
        actualObject = actual.getPropertyName();
        if (!equivelentObjects(expectedObject, actualObject)) {
            ok = false;
            msg += "\n\tExpected propertyName= " + expectedObject + "; "
                + " Actual propertyName=" + actualObject;
        } else { 
            msg += " propertyName=" + actualObject;
        } 
        expectedObject = expected.getOldValue(); 
        actualObject = actual.getOldValue();
        if (!equivelentObjects(expectedObject, actualObject)) {
            ok = false;
            msg += "\n\tExpected oldValue= " + expectedObject + "; "
                + " Actual oldValue=" + actualObject;
        } else { 
            msg += " oldValue=" + actualObject;
        } 
        expectedObject = expected.getNewValue();
        actualObject = actual.getNewValue();
        if (!equivelentObjects(expectedObject, actualObject)) {
            ok = false;
            msg += "\n\tExpected newValue= " + expectedObject + "; "
                + " Actual newValue=" + actualObject;