use of org.xwiki.observation.event.DocumentUpdateEvent in project xwiki-platform by xwiki.
the class LegacyEventDispatcherTest method testLegacyDocumentUpdateEventGetsDispatched.
@Test
public void testLegacyDocumentUpdateEventGetsDispatched() throws Exception {
this.registerListenerWithLegacyEvent(new DocumentUpdateEvent());
this.om.notify(new DocumentUpdatedEvent(new DocumentReference("wiki", "space", "name")), null);
// The notification is synchronous, so the following assertion will only be tested
// once all matching event listeners have been notified.
Assert.assertNotNull("Should have been notified by legacy event dispatcher", this.receivedEvent);
Assert.assertEquals("Wrong event filter", "wiki:space.name", ((FilterableEvent) this.receivedEvent).getEventFilter().getFilter());
}
Aggregations