123124125126127128129130131132
@Test public void closedStagesAreRemoved() throws Exception { theater.add(defaultStage); new StageClosedEvent().dispatch(defaultStage); assertEquals(null, theater.get("default")); assertEquals(null, theater.getActiveStage()); }
133134135136137138139140141
@Test public void tryToCloseTheProductionWhenEmptied() throws Exception { theater.add(defaultStage); new StageClosedEvent().dispatch(defaultStage); assertEquals(true, production.closeAttempted); }
146147148149150151152153154
MockStage stage2 = new MockStage("two"); theater.add(defaultStage); theater.add(stage2); stage2.setVital(true); new StageClosedEvent().dispatch(defaultStage); assertEquals(false, production.closeAttempted); }
83848586878889
closing = true; new StageClosingEvent().dispatch(this); hide(); setScene(null); doClose(); new StageClosedEvent().dispatch(this); }