Search in sources :

Example 1 with AxesStyle

use of net.sf.latexdraw.model.api.shape.AxesStyle in project latexdraw by arnobl.

the class TestPencilAxesStyle method testSelectLineStylePencil.

@Test
public void testSelectLineStylePencil() {
    Cmds.of(activatePencil, pencilCreatesAxes, updateIns).execute();
    final AxesStyle style = shapeAxes.getSelectionModel().getSelectedItem();
    Cmds.of(selectAxeStyle).execute();
    final AxesStyle newStyle = shapeAxes.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((AxesProp) editing.createShapeInstance()).getAxesStyle());
    assertNotEquals(style, newStyle);
}
Also used : AxesStyle(net.sf.latexdraw.model.api.shape.AxesStyle) Test(org.junit.Test)

Example 2 with AxesStyle

use of net.sf.latexdraw.model.api.shape.AxesStyle in project latexdraw by arnobl.

the class TestHandAxeStyle method testSelectLineStyleSelection.

@Test
public void testSelectLineStyleSelection() {
    Cmds.of(activateHand, selectionAddAxes, selectionAddRec, selectionAddAxes, updateIns).execute();
    final AxesStyle style = shapeAxes.getSelectionModel().getSelectedItem();
    Cmds.of(selectAxeStyle).execute();
    final AxesStyle newStyle = shapeAxes.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((AxesProp) drawing.getSelection().getShapeAt(0).orElseThrow()).getAxesStyle());
    assertEquals(newStyle, ((AxesProp) drawing.getSelection().getShapeAt(2).orElseThrow()).getAxesStyle());
    assertNotEquals(style, newStyle);
}
Also used : AxesStyle(net.sf.latexdraw.model.api.shape.AxesStyle) Test(org.junit.Test)

Aggregations

AxesStyle (net.sf.latexdraw.model.api.shape.AxesStyle)2 Test (org.junit.Test)2