Search in sources :

Example 6 with FakePropProxy

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

the class TextAreaPanelTest method setUp.

@Before
public void setUp() {
    assumeTrue(TestUtil.notHeadless());
    panel = new TextAreaPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(panel);
    root = new FakeScene();
    root.add(parent);
    root.setStage(new MockStage());
    graphics = new MockGraphics();
    model = panel.getModel();
    model.setText("Some Text");
}
Also used : PropPanel(limelight.ui.model.PropPanel) MockGraphics(limelight.ui.MockGraphics) FakeScene(limelight.ui.model.FakeScene) MockStage(limelight.ui.model.MockStage) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Example 7 with FakePropProxy

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

the class TextBoxPanelTest method setUp.

@Before
public void setUp() {
    assumeTrue(TestUtil.notHeadless());
    panel = new TextBoxPanel();
    parent = new PropPanel(new FakePropProxy());
    parent.add(panel);
    graphics = new MockGraphics();
    model = panel.getModel();
    model.setText("Some Text");
}
Also used : PropPanel(limelight.ui.model.PropPanel) MockGraphics(limelight.ui.MockGraphics) FakePropProxy(limelight.model.api.FakePropProxy) Before(org.junit.Before)

Example 8 with FakePropProxy

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

the class ScenePanelTest method unindexingPropWithoutIdDoesntCrash.

@Test
public void unindexingPropWithoutIdDoesntCrash() throws Exception {
    setupIlluminatedScene();
    PropPanel prop = new PropPanel(new FakePropProxy());
    root.add(prop);
    try {
        root.removeFromCaches(prop);
    } catch (Exception e) {
        fail("Should not throw error: " + e.toString());
    }
}
Also used : FakePropProxy(limelight.model.api.FakePropProxy) LimelightException(limelight.LimelightException) Test(org.junit.Test)

Example 9 with FakePropProxy

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

the class TempTextAccessorTest method shouldReplaceItselfWithTextPanel.

@Test
public void shouldReplaceItselfWithTextPanel() throws Exception {
    PropPanel panel = new PropPanel(new FakePropProxy());
    assertEquals(TempTextAccessor.instance(), panel.getTextAccessor());
    TempTextAccessor.instance().setText("Howdy", panel);
    TextAccessor newAccessor = panel.getTextAccessor();
    assertEquals(TextPanel.class, newAccessor.getClass());
    assertEquals("Howdy", newAccessor.getText());
}
Also used : FakePropProxy(limelight.model.api.FakePropProxy) Test(org.junit.Test)

Example 10 with FakePropProxy

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

the class ScenePanelTest method propRemovalCleansBackstage.

@Test
public void propRemovalCleansBackstage() throws Exception {
    PropPanel panel = new PropPanel(new FakePropProxy(), Util.toMap("id", "some id"));
    root.add(panel);
    root.getBackstage(panel);
    assertEquals(1, root.backstage_PRIVATE().size());
    root.removeFromCaches(panel);
    assertEquals(0, root.backstage_PRIVATE().size());
}
Also used : FakePropProxy(limelight.model.api.FakePropProxy) 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