use of limelight.ui.events.stage.StageActivatedEvent in project limelight by slagyr.
the class TheaterTest method removedStagesDoNotGetActivated.
@Test
public void removedStagesDoNotGetActivated() throws Exception {
theater.add(defaultStage);
theater.remove(defaultStage);
new StageActivatedEvent().dispatch(defaultStage);
assertEquals(null, theater.getActiveStage());
}
use of limelight.ui.events.stage.StageActivatedEvent in project limelight by slagyr.
the class TheaterTest method knowsWhenStagesAreDeactivated.
@Test
public void knowsWhenStagesAreDeactivated() throws Exception {
MockStage stage2 = new MockStage("two");
theater.add(defaultStage);
theater.add(stage2);
new StageActivatedEvent().dispatch(defaultStage);
new StageDeactivatedEvent().dispatch(defaultStage);
assertEquals(null, theater.getActiveStage());
}
use of limelight.ui.events.stage.StageActivatedEvent in project limelight by slagyr.
the class TheaterTest method activeStage.
@Test
public void activeStage() throws Exception {
MockStage stage2 = new MockStage("two");
theater.add(defaultStage);
theater.add(stage2);
assertEquals(null, theater.getActiveStage());
new StageActivatedEvent().dispatch(stage2);
assertEquals(stage2, theater.getActiveStage());
new StageActivatedEvent().dispatch(defaultStage);
assertEquals(defaultStage, theater.getActiveStage());
}
use of limelight.ui.events.stage.StageActivatedEvent in project limelight by slagyr.
the class ProductionTest method openSceneWithActiveStage.
@Test
public void openSceneWithActiveStage() throws Exception {
production.loadProduction();
MockStage stage = new MockStage("active");
production.getTheater().add(stage);
new StageActivatedEvent().dispatch(stage);
Scene scene = new FakeScene();
production.stubbedScene = scene;
production.openScene("scenePath", Util.toMap());
assertEquals("scenePath", production.loadedScenePath);
assertEquals(scene, stage.getScene());
assertEquals(true, stage.opened);
}
Aggregations