use of limelight.ui.model.MockStage 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.model.MockStage in project limelight by slagyr.
the class TheaterTest method attemptsToCloseProductionWhenAllStagesAreHidden.
@Test
public void attemptsToCloseProductionWhenAllStagesAreHidden() throws Exception {
MockStage stage2 = new MockStage("two");
defaultStage.setVital(false);
stage2.setVital(false);
theater.add(defaultStage);
theater.add(stage2);
defaultStage.setVisible(false);
stage2.setVisible(false);
new StageDeactivatedEvent().dispatch(defaultStage);
new StageDeactivatedEvent().dispatch(stage2);
assertEquals(true, production.closeAttempted);
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class TextAreaPanelTest method setUp.
@Before
public void setUp() {
assumeTrue(TestUtil.notHeadless());
panel = new TextAreaPanel();
parent = new PropPanel(new FakePropProxy());
parent.add(panel);
root = new FakeScene();
root.add(parent);
root.setStage(new MockStage());
graphics = new MockGraphics();
model = panel.getModel();
model.setText("Some Text");
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class DropDownPanelTest method acquiresFocusWhenPressed.
@Test
public void acquiresFocusWhenPressed() throws Exception {
final MockStage stage = new MockStage();
root.setStage(stage);
panel.setChoicesVargs(1, 2, 3);
new ButtonPushedEvent().dispatch(panel);
assertEquals(true, panel.hasFocus());
}
use of limelight.ui.model.MockStage in project limelight by slagyr.
the class TextInputPanelTest method setUp.
@Before
public void setUp() {
assumeTrue(TestUtil.notHeadless());
root = new FakeScene();
panel = new MockTextInputPanel();
parent = new PropPanel(new FakePropProxy());
parent.add(panel);
root.add(parent);
stage = new MockStage();
root.setStage(stage);
model = panel.getModel();
model.setText("Some Text");
}
Aggregations