com.mockobjects.beans

Class MockPropertyChangeListener

public class MockPropertyChangeListener extends MockObject implements 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.

Author: Ringo De Smet - MediaGeniX NV

Constructor Summary
MockPropertyChangeListener(String name)
MockPropertyChangeListener()
Method Summary
voidpropertyChange(PropertyChangeEvent event)
voidsetExpectedEventCount(int expectedEventCount)
voidsetExpectedNewValue(Object expectedNewValue)
voidsetExpectedOldValue(Object expectedOldValue)
voidsetExpectedPropertyName(String expectedPropertyName)

Constructor Detail

MockPropertyChangeListener

public MockPropertyChangeListener(String name)

MockPropertyChangeListener

public MockPropertyChangeListener()

Method Detail

propertyChange

public void propertyChange(PropertyChangeEvent event)

setExpectedEventCount

public void setExpectedEventCount(int expectedEventCount)

setExpectedNewValue

public void setExpectedNewValue(Object expectedNewValue)

setExpectedOldValue

public void setExpectedOldValue(Object expectedOldValue)

setExpectedPropertyName

public void setExpectedPropertyName(String expectedPropertyName)
Copyright © 2002 Mock Objects. All Rights Reserved.