use of limelight.events.EventAction in project limelight by slagyr.
the class EventActionMulticasterTest method addingActionToNull.
@Test
public void addingActionToNull() throws Exception {
EventAction action = EventActionMulticaster.add(null, action1);
assertSame(action1, action);
}
use of limelight.events.EventAction in project limelight by slagyr.
the class JavaProductionTest method illuminatingTheProductionWithAction.
@Test
public void illuminatingTheProductionWithAction() throws Exception {
writeSamplePlayerTo(fs.outputStream("/testProduction/classes/SamplePlayer.class"));
fs.createTextFile("/testProduction/production.xml", "<production classpath='classes' class='SamplePlayer'><onProductionCreated>sampleAction</onProductionCreated></production>");
production.illuminate();
final JavaPlayer player = (JavaPlayer) production.getPlayer();
final List<EventAction> onCreatedActions = production.getEventHandler().getActions(ProductionCreatedEvent.class);
assertEquals(1, onCreatedActions.size());
new ProductionCreatedEvent().dispatch(production);
assertEquals(1, player.getPlayerClass().getField("invocations").get(lastSamplePlayer(player)));
}
Aggregations