java.lang.Object
com.mockobjects.MockObject
com.mockobjects.beans.MockPropertyChangeListener
- All Implemented Interfaces:
- java.util.EventListener, java.beans.PropertyChangeListener, com.mockobjects.Verifiable
- public class MockPropertyChangeListener
- extends com.mockobjects.MockObject
- implements java.beans.PropertyChangeListener
Mock object for a PropertyChangeListener.
This mock object can be used in verifying the event propagation mechanism
of beans. You can set the information you expect from a PropertyChangeEvent
as well as the number of events. If you expect more than one event, only the
actual values of the last event are stored.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
propertyName
protected com.mockobjects.ExpectationValue propertyName
oldValue
protected com.mockobjects.ExpectationValue oldValue
newValue
protected com.mockobjects.ExpectationValue newValue
eventCount
protected com.mockobjects.ExpectationCounter eventCount
MockPropertyChangeListener
public MockPropertyChangeListener(java.lang.String name)
MockPropertyChangeListener
public MockPropertyChangeListener()
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent event)
- Description copied from interface:
java.beans.PropertyChangeListener
- Fired after a Bean's property has changed.
- Specified by:
propertyChange in interface java.beans.PropertyChangeListener
setExpectedNewValue
public void setExpectedNewValue(java.lang.Object expectedNewValue)
setExpectedOldValue
public void setExpectedOldValue(java.lang.Object expectedOldValue)
setExpectedEventCount
public void setExpectedEventCount(int expectedEventCount)
setExpectedPropertyName
public void setExpectedPropertyName(java.lang.String expectedPropertyName)