use of org.xwiki.bridge.event.ActionExecutingEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testDefaultConstructor.
// Tests for constructors
@Test
public void testDefaultConstructor() {
ActionExecutingEvent event = new ActionExecutingEvent();
Assert.assertNull("A default action was used!", 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 testHashCodeForWildcardAction.
@Test
public void testHashCodeForWildcardAction() {
ActionExecutingEvent event = new ActionExecutingEvent();
Assert.assertTrue("Hashcode for wildcard action wasn't zero!", event.hashCode() == 0);
}
use of org.xwiki.bridge.event.ActionExecutingEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testEqualsSameObject.
// Tests for equals(Object)
@Test
public void testEqualsSameObject() {
ActionExecutingEvent event = new ActionExecutingEvent("something");
Assert.assertTrue("Same object wasn't equal!", event.equals(event));
}
use of org.xwiki.bridge.event.ActionExecutingEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testCancel.
// Tests for cancel()
@Test
public void testCancel() {
ActionExecutingEvent event = new ActionExecutingEvent("something");
Assert.assertFalse("Event was created canceled!", event.isCanceled());
event.cancel();
Assert.assertTrue("Event wasn't canceled when requested!", event.isCanceled());
}
use of org.xwiki.bridge.event.ActionExecutingEvent in project xwiki-platform by xwiki.
the class ActionExecutingEventTest method testMatchesSameObject.
// Tests for matches(Object)
@Test
public void testMatchesSameObject() {
ActionExecutingEvent event = new ActionExecutingEvent("something");
Assert.assertTrue("Same object wasn't matched!", event.matches(event));
}
Aggregations