Search in sources :

Example 1 with StageActivatedEvent

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());
}
Also used : StageActivatedEvent(limelight.ui.events.stage.StageActivatedEvent) Test(org.junit.Test)

Example 2 with StageActivatedEvent

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());
}
Also used : StageDeactivatedEvent(limelight.ui.events.stage.StageDeactivatedEvent) MockStage(limelight.ui.model.MockStage) StageActivatedEvent(limelight.ui.events.stage.StageActivatedEvent) Test(org.junit.Test)

Example 3 with StageActivatedEvent

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());
}
Also used : MockStage(limelight.ui.model.MockStage) StageActivatedEvent(limelight.ui.events.stage.StageActivatedEvent) Test(org.junit.Test)

Example 4 with StageActivatedEvent

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);
}
Also used : MockStage(limelight.ui.model.MockStage) StageActivatedEvent(limelight.ui.events.stage.StageActivatedEvent) FakeScene(limelight.ui.model.FakeScene) Scene(limelight.ui.model.Scene) FakeScene(limelight.ui.model.FakeScene) Test(org.junit.Test)

Aggregations

StageActivatedEvent (limelight.ui.events.stage.StageActivatedEvent)4 Test (org.junit.Test)4 MockStage (limelight.ui.model.MockStage)3 StageDeactivatedEvent (limelight.ui.events.stage.StageDeactivatedEvent)1 FakeScene (limelight.ui.model.FakeScene)1 Scene (limelight.ui.model.Scene)1