Search in sources :

Example 21 with MockStage

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

Aggregations

MockStage (limelight.ui.model.MockStage)21 Test (org.junit.Test)16 FakeScene (limelight.ui.model.FakeScene)11 Scene (limelight.ui.model.Scene)5 FakePropProxy (limelight.model.api.FakePropProxy)3 StageActivatedEvent (limelight.ui.events.stage.StageActivatedEvent)3 StageDeactivatedEvent (limelight.ui.events.stage.StageDeactivatedEvent)3 PropPanel (limelight.ui.model.PropPanel)3 Before (org.junit.Before)3 MockGraphics (limelight.ui.MockGraphics)2 LimelightException (limelight.LimelightException)1 RichStyle (limelight.styles.RichStyle)1 StageClosedEvent (limelight.ui.events.stage.StageClosedEvent)1 MockDrawable (limelight.ui.model.MockDrawable)1 TextBoxPanel (limelight.ui.model.inputs.TextBoxPanel)1 Opts (limelight.util.Opts)1