use of limelight.ui.model.inputs.MockEventAction in project limelight by slagyr.
the class ProductionTest method setUp.
@Before
public void setUp() throws Exception {
production = new FakeProduction("/foo/bar");
studio = new MockStudio();
Context.instance().studio = studio;
action = new MockEventAction();
}
use of limelight.ui.model.inputs.MockEventAction in project limelight by slagyr.
the class ProductionTest method closeProduction.
@Test
public void closeProduction() throws Exception {
production.open();
MockEventAction closingAction = new MockEventAction();
MockEventAction closedAction = new MockEventAction();
production.getEventHandler().add(ProductionClosingEvent.class, closingAction);
production.getEventHandler().add(ProductionClosedEvent.class, closedAction);
production.close();
production.getClosingThread().join();
assertEquals(true, closingAction.invoked);
assertEquals(false, production.getTheater().isOpen());
assertEquals(true, closedAction.invoked);
}
use of limelight.ui.model.inputs.MockEventAction in project limelight by slagyr.
the class StageTest method closing.
@Test
public void closing() throws Exception {
MockEventAction closingAction = new MockEventAction();
MockEventAction closedAction = new MockEventAction();
stage.getEventHandler().add(StageClosingEvent.class, closingAction);
stage.getEventHandler().add(StageClosedEvent.class, closedAction);
stage.close();
assertEquals(true, closingAction.invoked);
assertEquals(false, stage.isVisible());
assertEquals(false, stage.isOpen());
assertEquals(true, closedAction.invoked);
}
use of limelight.ui.model.inputs.MockEventAction in project limelight by slagyr.
the class StageMouseListenerTest method setUp.
@Before
public void setUp() throws Exception {
component = new java.awt.Panel();
FakeScene root = new FakeScene();
listener = new StageMouseListener(root);
parent = new MockParentPanel();
child = new MockPanel();
root.add(parent);
parent.add(child);
Scene scene = new FakeScene();
scene.add(parent);
scene.setStage(new MockStage());
parent.setSize(1000, 1000);
child.setLocation(250, 250);
child.setSize(500, 500);
parentAction = new MockEventAction();
childAction = new MockEventAction();
}
use of limelight.ui.model.inputs.MockEventAction in project limelight by slagyr.
the class PanelEventHandlerTest method setUp.
@Before
public void setUp() throws Exception {
action = new MockEventAction();
parent = new TestableParentPanel();
panel = new TestablePanelBase();
parent.add(panel);
}
Aggregations