Package com.mockobjects.beans

# Class MockPropertyChangeListener

java.lang.Object
com.mockobjects.MockObject
com.mockobjects.beans.MockPropertyChangeListener

All Implemented Interfaces:
  `Verifiable`, `PropertyChangeListener`, `EventListener`

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

Constructors
Constructor
Description
`MockPropertyChangeListener()`
`MockPropertyChangeListener(String name)`

## Method Summary

Modifier and Type
Method
Description
`void`
`propertyChange(PropertyChangeEvent event)`
`void`
`setExpectedEventCount(int expectedEventCount)`
`void`
`setExpectedNewValue(Object expectedNewValue)`
`void`
`setExpectedOldValue(Object expectedOldValue)`
`void`
`setExpectedPropertyName(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 Details

### MockPropertyChangeListener

public MockPropertyChangeListener(String name)

### MockPropertyChangeListener

public MockPropertyChangeListener()

## Method Details

### propertyChange

public void propertyChange(PropertyChangeEvent event)

Specified by:
  `propertyChange` in interface `PropertyChangeListener`

### setExpectedNewValue

public void setExpectedNewValue(Object expectedNewValue)

### setExpectedOldValue

public void setExpectedOldValue(Object expectedOldValue)

### setExpectedEventCount

public void setExpectedEventCount(int expectedEventCount)

### setExpectedPropertyName

public void setExpectedPropertyName(String expectedPropertyName)