use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testDoesntEqualDifferentTypeOfAction.
@Test
public void testDoesntEqualDifferentTypeOfAction() {
ActionExecutingEvent event = new ActionExecutingEvent("something");
Assert.assertFalse("Same object isn't matched!", event.equals(new ActionExecutedEvent("something")));
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class LegacyNotificationDispatcher method getEvents.
@Override
public List<Event> getEvents() {
return new ArrayList<Event>() {
{
add(new DocumentDeletedEvent());
add(new DocumentCreatedEvent());
add(new DocumentUpdatedEvent());
add(new DocumentDeletingEvent());
add(new DocumentCreatingEvent());
add(new DocumentUpdatingEvent());
add(new ActionExecutedEvent());
add(new ActionExecutingEvent());
}
};
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testHashCodeForWildcardAction.
@Test
public void testHashCodeForWildcardAction() {
ActionExecutedEvent event = new ActionExecutedEvent();
Assert.assertTrue("Hashcode for wildcard action wasn't zero!", event.hashCode() == 0);
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testEmptyActionDoesntMatch.
@Test
public void testEmptyActionDoesntMatch() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertFalse("Empty action behaves as wildcard!", new ActionExecutedEvent("").matches(event));
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testDoesntMatchWildcardAction.
@Test
public void testDoesntMatchWildcardAction() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertFalse("Wildcard action was matched!", event.matches(new ActionExecutedEvent()));
}
Aggregations