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());
}
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());
}
use of limelight.model.api.FakePropProxy in project limelight by slagyr.
the class CheckBoxPanelTest method setUp.
@Before
public void setUp() throws Exception {
panel = new CheckBoxPanel();
parent = new PropPanel(new FakePropProxy());
parent.add(panel);
root = new FakeScene();
root.add(parent);
}
use of limelight.model.api.FakePropProxy in project limelight by slagyr.
the class DropDownPanelTest method setUp.
@Before
public void setUp() throws Exception {
panel = new DropDownPanel();
parent = new PropPanel(new FakePropProxy());
parent.add(panel);
root = new FakeScene();
root.add(parent);
root.styleStore = BuiltInStyles.all();
root.setProduction(new FakeProduction());
}
use of limelight.model.api.FakePropProxy in project limelight by slagyr.
the class RadioButtonPanelTest method settingTheGroupName.
@Test
public void settingTheGroupName() throws Exception {
Scene scene = new FakeScene();
PropPanel parent1 = new PropPanel(new FakePropProxy("parent1"));
RadioButtonPanel radio1 = new RadioButtonPanel();
parent1.add(radio1);
PropPanel parent2 = new PropPanel(new FakePropProxy("parent2"));
RadioButtonPanel radio2 = new RadioButtonPanel();
parent2.add(radio2);
scene.add(parent1);
scene.add(parent2);
final RadioButtonGroup group = scene.getButtonGroups().get("test_group");
assertEquals(0, group.getButtons().size());
radio1.setGroup("test_group");
assertEquals(1, group.getButtons().size());
radio2.setGroup("test_group");
assertEquals(2, group.getButtons().size());
assertEquals(true, group.getButtons().contains(radio1));
assertEquals(true, group.getButtons().contains(radio2));
}
Aggregations