use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testMatchesSameObject.
// Tests for matches(Object)
@Test
public void testMatchesSameObject() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertTrue("Same object wasn't matched!", event.matches(event));
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testDoesntEqualDifferentAction.
@Test
public void testDoesntEqualDifferentAction() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertFalse("A different action was equal!", event.equals(new ActionExecutedEvent("else")));
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testDefaultConstructor.
// Tests for constructors
@Test
public void testDefaultConstructor() {
ActionExecutedEvent event = new ActionExecutedEvent();
Assert.assertNull("A default action was used!", event.getActionName());
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testHashCode.
// Tests for hashCode()
@Test
public void testHashCode() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertTrue("Hashcode was zero!", event.hashCode() != 0);
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testDoesntMatchNull.
@Test
public void testDoesntMatchNull() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertFalse("null was matched!", event.matches(null));
}
Aggregations