Search in sources :

Example 1 with MockProp

use of limelight.ui.model.MockProp in project limelight by slagyr.

the class BorderPainterTest method setUp.

public void setUp() throws Exception {
    panel = new MockProp();
    style = panel.getStyle();
    border = new Box(5, 5, 100, 100);
    panel.boxInsideMargins = border;
    painter = BorderPainter.instance;
    graphics = new MockGraphics();
}
Also used : MockGraphics(limelight.ui.MockGraphics) MockProp(limelight.ui.model.MockProp) Box(limelight.util.Box)

Example 2 with MockProp

use of limelight.ui.model.MockProp in project limelight by slagyr.

the class BackgroundPainterTest method setUp.

public void setUp() throws Exception {
    panel = new MockProp();
    style = panel.getStyle();
    painter = BackgroundPainter.instance;
    graphics = new MockGraphics();
}
Also used : MockGraphics(limelight.ui.MockGraphics) MockProp(limelight.ui.model.MockProp)

Example 3 with MockProp

use of limelight.ui.model.MockProp in project limelight by slagyr.

the class DefaultPainterTest method shouldPaint.

@Test
public void shouldPaint() throws Exception {
    MockPainter mockBackgroundPainter = new MockPainter();
    BackgroundPainter.instance = mockBackgroundPainter;
    MockPainter mockBorderPainter = new MockPainter();
    BorderPainter.instance = mockBorderPainter;
    MockProp panel = new MockProp();
    MockGraphics graphics = new MockGraphics();
    DefaultPainter.instance.paint(graphics, panel);
    assertEquals(true, mockBackgroundPainter.painted);
    assertEquals(true, mockBorderPainter.painted);
}
Also used : MockGraphics(limelight.ui.MockGraphics) MockProp(limelight.ui.model.MockProp) Test(org.junit.Test)

Aggregations

MockGraphics (limelight.ui.MockGraphics)3 MockProp (limelight.ui.model.MockProp)3 Box (limelight.util.Box)1 Test (org.junit.Test)1