Search in sources :

Example 21 with FakePropProxy

use of limelight.model.api.FakePropProxy in project limelight by slagyr.

the class TextBoxPanelTest method setsPainterOnParent.

@Test
public void setsPainterOnParent() throws Exception {
    PropPanel newParent = new PropPanel(new FakePropProxy());
    panel.setParent(newParent);
    assertEquals(TextInputPanel.TextInputPropPainter.instance, newParent.getPainter());
}
Also used : PropPanel(limelight.ui.model.PropPanel) FakePropProxy(limelight.model.api.FakePropProxy) Test(org.junit.Test)

Example 22 with FakePropProxy

use of limelight.model.api.FakePropProxy in project limelight by slagyr.

the class InputPanelUtilTest method setUp.

public void setUp() throws Exception {
    input = new TestableInputPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(input);
    KeyboardFocusManager.installed();
}
Also used : PropPanel(limelight.ui.model.PropPanel) FakePropProxy(limelight.model.api.FakePropProxy)

Example 23 with FakePropProxy

use of limelight.model.api.FakePropProxy in project limelight by slagyr.

the class RadioButtonPanelTest method setUp.

@Before
public void setUp() throws Exception {
    panel = new RadioButtonPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(panel);
    root = new FakeScene();
    root.add(parent);
}
Also used : PropPanel(limelight.ui.model.PropPanel) FakeScene(limelight.ui.model.FakeScene) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Example 24 with FakePropProxy

use of limelight.model.api.FakePropProxy in project limelight by slagyr.

the class ScenePanelTest method propConnectedToSceneIsIndexedWhenIdIsSet.

@Test
public void propConnectedToSceneIsIndexedWhenIdIsSet() throws Exception {
    setupIlluminatedScene();
    PropPanel panel = new PropPanel(new FakePropProxy(), Util.toMap("id", "some id"));
    root.add(panel);
    assertSame(panel, root.find("some id"));
}
Also used : FakePropProxy(limelight.model.api.FakePropProxy) Test(org.junit.Test)

Example 25 with FakePropProxy

use of limelight.model.api.FakePropProxy in project limelight by slagyr.

the class ScenePanelTest method duplicateIdsCausesAnError.

@Test
public void duplicateIdsCausesAnError() throws Exception {
    setupIlluminatedScene();
    PropPanel prop1 = new PropPanel(new FakePropProxy(), Util.toMap("id", "some id"));
    PropPanel prop2 = new PropPanel(new FakePropProxy(), Util.toMap("id", "some id"));
    root.add(prop1);
    try {
        root.add(prop2);
        fail("Should have raised error");
    } catch (LimelightException e) {
        assertEquals("Duplicate id: some id", e.getMessage());
    }
}
Also used : FakePropProxy(limelight.model.api.FakePropProxy) LimelightException(limelight.LimelightException) Test(org.junit.Test)

Aggregations

FakePropProxy (limelight.model.api.FakePropProxy)37 PropPanel (limelight.ui.model.PropPanel)22 FakeScene (limelight.ui.model.FakeScene)17 Test (org.junit.Test)17 Before (org.junit.Before)15 CastEvent (limelight.ui.events.panel.CastEvent)7 MockGraphics (limelight.ui.MockGraphics)3 MockStage (limelight.ui.model.MockStage)3 LimelightException (limelight.LimelightException)2 FakeProduction (limelight.model.FakeProduction)2 RadioButtonGroup (limelight.ui.RadioButtonGroup)2 Scene (limelight.ui.model.Scene)2 FakeFileSystem (limelight.io.FakeFileSystem)1 FakePlayerRecruiter (limelight.model.api.FakePlayerRecruiter)1 MouseClickedEvent (limelight.ui.events.panel.MouseClickedEvent)1 MockDrawable (limelight.ui.model.MockDrawable)1 TextBoxPanel (limelight.ui.model.inputs.TextBoxPanel)1