use of limelight.ui.MockPanel in project limelight by slagyr.
the class ParentPanelTest method shouldCanAddPanels.
@Test
public void shouldCanAddPanels() throws Exception {
Panel panel1 = new MockPanel();
Panel panel2 = new MockPanel();
panel.add(panel1);
panel.add(panel2);
assertEquals(panel1, panel.getChildren().get(0));
assertEquals(panel2, panel.getChildren().get(1));
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class ParentPanelTest method shouldRemoveDoesntRequireLayoutIfNoChildWasRemoved.
@Test
public void shouldRemoveDoesntRequireLayoutIfNoChildWasRemoved() throws Exception {
Panel child = new MockPanel();
panel.add(child);
resetFamilyLayouts();
panel.remove(new MockPanel());
assertEquals(false, panel.needsLayout());
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class ParentPanelTest method shouldGetChildrenProvidesReadonlyList.
@Test
public void shouldGetChildrenProvidesReadonlyList() throws Exception {
Panel child = new MockPanel();
panel.add(child);
java.util.List<Panel> children = panel.getChildren();
try {
children.add(new MockPanel());
fail("Should have thrown exception");
} catch (UnsupportedOperationException e) {
}
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class AnimationLoopTest method testShouldNotBeIdleWithAnimationTasks.
public void testShouldNotBeIdleWithAnimationTasks() throws Exception {
loop.add(new MockAnimation(20, new MockPanel()));
assertEquals(false, loop.shouldBeIdle());
}
use of limelight.ui.MockPanel in project limelight by slagyr.
the class AnimationLoopTest method setUp.
public void setUp() throws Exception {
loop = new AnimationLoop();
animation20 = new MockAnimation(20, new MockPanel());
animation30 = new MockAnimation(30, new MockPanel());
animation10 = new MockAnimation(10, new MockPanel());
}
Aggregations