com.mockobjects.beans
Class MockPropertyChangeListener

java.lang.Object
  extended bycom.mockobjects.MockObject
      extended bycom.mockobjects.beans.MockPropertyChangeListener
All Implemented Interfaces:
java.util.EventListener, java.beans.PropertyChangeListener, Verifiable

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

Author:
Ringo De Smet - MediaGeniX NV

Constructor Summary
MockPropertyChangeListener()
           
MockPropertyChangeListener(java.lang.String name)
           
 
Method Summary
 void propertyChange(java.beans.PropertyChangeEvent event)
           
 void setExpectedEventCount(int expectedEventCount)
           
 void setExpectedNewValue(java.lang.Object expectedNewValue)
           
 void setExpectedOldValue(java.lang.Object expectedOldValue)
           
 void setExpectedPropertyName(java.lang.String expectedPropertyName)
           
 
Methods inherited from class com.mockobjects.MockObject
notImplemented, notYetImplemented, verify
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockPropertyChangeListener

public MockPropertyChangeListener(java.lang.String name)

MockPropertyChangeListener

public MockPropertyChangeListener()
Method Detail

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
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)


Copyright © 2002 Mock Objects. All Rights Reserved.