use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testDoesntEqualDifferentTypeOfAction.
@Test
public void testDoesntEqualDifferentTypeOfAction() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertFalse("Same object isn't matched!", event.equals(new ActionExecutingEvent("something")));
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testHashCodeWithEmptyAction.
@Test
public void testHashCodeWithEmptyAction() {
ActionExecutedEvent event = new ActionExecutedEvent("");
Assert.assertTrue("Hashcode for empty string action wasn't zero!", event.hashCode() == 0);
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testWildcardActionMatchesAll.
@Test
public void testWildcardActionMatchesAll() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertTrue("Wildcard action didn't match!", new ActionExecutedEvent().matches(event));
Assert.assertTrue("Wildcard action didn't match another wildcard action!", new ActionExecutedEvent().matches(new ActionExecutedEvent()));
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testDoesntEqualWildcardAction.
@Test
public void testDoesntEqualWildcardAction() {
ActionExecutedEvent event = new ActionExecutedEvent("something");
Assert.assertFalse("Wildcard action was equal!", event.equals(new ActionExecutedEvent()));
}
use of org.xwiki.bridge.event.ActionExecutedEvent in project xwiki-platform by xwiki.
the class ActionExecutedEventTest method testWildcardActionDoesntEqualEmptyAction.
@Test
public void testWildcardActionDoesntEqualEmptyAction() {
ActionExecutedEvent event = new ActionExecutedEvent("");
Assert.assertFalse("Wildcard action equals another action!", new ActionExecutedEvent().equals(event));
}
Aggregations