use of limelight.ui.model.MockStage in project limelight by slagyr.
the class ProductionTest method defaultScenesCanBeDisabled.
@Test
public void defaultScenesCanBeDisabled() throws Exception {
MockStage stage = new MockStage();
production.getTheater().add(stage);
stage.setDefaultSceneName("defaultScene");
production.stubbedScene = new FakeScene();
production.open(Util.toMap("open-default-scenes", false));
assertEquals(false, stage.isOpen());
assertEquals(null, stage.getScene());
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class ProductionTest method openSceneLoadsStylesExtendingProductionStyles.
@Test
public void openSceneLoadsStylesExtendingProductionStyles() throws Exception {
production.loadProduction();
production.getTheater().add(new MockStage("mock"));
production.getStyles().put("newStyle", new RichStyle());
Scene scene = new FakeScene();
production.stubbedScene = scene;
production.openScene("scenePath", "mock", Util.toMap());
assertEquals(HashMap.class, scene.getStyles().getClass());
assertEquals(true, scene.getStyles().containsKey("limelight_builtin_curtains"));
assertEquals(true, scene.getStyles().containsKey("newStyle"));
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class ProductionTest method openSceneWithNoActiveStage.
@Test
public void openSceneWithNoActiveStage() throws Exception {
production.loadProduction();
final MockStage stage = (MockStage) production.getTheater().getDefaultStage();
Scene scene = new FakeScene();
production.stubbedScene = scene;
production.openScene("scenePath", Util.toMap());
assertEquals("scenePath", production.loadedScenePath);
assertEquals(scene, stage.getScene());
assertEquals(true, stage.opened);
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class ProductionTest method openSceneWithStage.
@Test
public void openSceneWithStage() throws Exception {
production.loadProduction();
MockStage stage = new MockStage("mock");
production.getTheater().add(stage);
Scene scene = new FakeScene();
production.stubbedScene = scene;
production.openScene("scenePath", "mock", Util.toMap());
assertEquals("scenePath", production.loadedScenePath);
assertEquals(scene, stage.getScene());
assertEquals(true, stage.opened);
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class TheaterTest method setUp.
@Before
public void setUp() throws Exception {
production = new FakeProduction();
theater = new Theater(production);
defaultStage = new MockStage("default");
}
Aggregations