use of limelight.ui.model.FakeScene in project limelight by slagyr.
the class JavaPlayerTest method setUp.
@Before
public void setUp() throws Exception {
FakeFileSystem fs = FakeFileSystem.installed();
JavaProductionTest.writeSamplePlayerTo(fs.outputStream("/testProduction/classes/SamplePlayer.class"));
samplePlayerClass = new PlayerClassLoader("/testProduction/classes").loadClass("SamplePlayer");
prop = new PropPanel(new FakePropProxy());
new FakeScene().add(prop);
}
use of limelight.ui.model.FakeScene in project limelight by slagyr.
the class ProductionTest method openDefaultScenes.
@Test
public void openDefaultScenes() throws Exception {
production.getEventHandler().add(ProductionOpenedEvent.class, action);
MockStage stage = new MockStage();
production.getTheater().add(stage);
stage.setDefaultSceneName("defaultScene");
Scene scene = new FakeScene();
production.stubbedScene = scene;
production.open(new Opts());
assertEquals(true, action.invoked);
assertEquals(true, stage.isOpen());
assertEquals(scene, stage.getScene());
}
use of limelight.ui.model.FakeScene in project limelight by slagyr.
the class ProductionTest method openSceneUpdatesOptionsWithNameAndPath.
@Test
public void openSceneUpdatesOptionsWithNameAndPath() throws Exception {
production.loadProduction();
production.getTheater().add(new MockStage("mock"));
production.stubbedScene = new FakeScene();
final Map<String, Object> options = Util.toMap();
production.openScene("scenePath/sceneName", "mock", options);
assertNotSame(options, production.loadedSceneOptions);
assertEquals("sceneName", production.loadedSceneOptions.get("name"));
assertEquals("scenePath/sceneName", production.loadedSceneOptions.get("path"));
}
use of limelight.ui.model.FakeScene 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