if (this.expectedEvents == null) { this.expectedEvents = new ArrayList(); } PropertyChangeEvent eventWithEquals = new ComparablePropertyChangeEvent(e); this.expectedEvents.add(eventWithEquals);
return this.actualEvents;
this.actualEvents.add(evt); if (this.expectedEventCount > -1 && this.actualEvents.size() > this.expectedEventCount) { Assert.fail("Exceeded the expected event count: " + this.expectedEventCount); }
this.expectedEventCount = expectedCount;
if (this.expectedEventCount > -1) { Assert.assertEquals("Actual event count", this.expectedEventCount, this.actualEvents.size()); } if (this.expectedEvents != null) { Assert.assertEquals("Actual events", this.expectedEvents, this.actualEvents); }