use of limelight.ui.events.stage.StageDeactivatedEvent 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.StageDeactivatedEvent 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.events.stage.StageDeactivatedEvent in project limelight by slagyr.
the class TheaterTest method doesntAttemptsToCloseProductionWhenAllStagesAreHiddenButStillHasVitalStage.
@Test
public void doesntAttemptsToCloseProductionWhenAllStagesAreHiddenButStillHasVitalStage() throws Exception {
MockStage stage2 = new MockStage("two");
defaultStage.setVital(false);
stage2.setVital(true);
theater.add(defaultStage);
theater.add(stage2);
defaultStage.setVisible(false);
stage2.setVisible(false);
new StageDeactivatedEvent().dispatch(defaultStage);
new StageDeactivatedEvent().dispatch(stage2);
assertEquals(false, production.closeAttempted);
}
Aggregations