use of org.xwiki.bridge.event.ActionExecutingEvent 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.ActionExecutingEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testWildcardActionMatchesAll.
@Test
public void testWildcardActionMatchesAll() {
ActionExecutingEvent event = new ActionExecutingEvent("something");
Assert.assertTrue("Wildcard action didn't match!", new ActionExecutingEvent().matches(event));
Assert.assertTrue("Wildcard action didn't match another wildcard action!", new ActionExecutingEvent().matches(new ActionExecutingEvent()));
}
use of org.xwiki.bridge.event.ActionExecutingEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testConstructorWithActionName.
@Test
public void testConstructorWithActionName() {
ActionExecutingEvent event = new ActionExecutingEvent("something");
Assert.assertEquals("Action name was lost!", "something", event.getActionName());
Assert.assertFalse("Event was created canceled!", event.isCanceled());
Assert.assertNull("A cancel reason was initially set!", event.getReason());
}
use of org.xwiki.bridge.event.ActionExecutingEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testEqualsSameAction.
@Test
public void testEqualsSameAction() {
ActionExecutingEvent event = new ActionExecutingEvent("something");
Assert.assertTrue("Same action wasn't equal!", event.equals(new ActionExecutingEvent("something")));
}
use of org.xwiki.bridge.event.ActionExecutingEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testEqualsWithNull.
@Test
public void testEqualsWithNull() {
ActionExecutingEvent event = new ActionExecutingEvent("something");
Assert.assertFalse("null was equal!", event.equals(null));
}
Aggregations