Search in sources :

Example 1 with TicksStyle

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

the class TestPencilAxesStyle method testSelectTicksStylePencil.

@Test
public void testSelectTicksStylePencil() {
    Cmds.of(activatePencil, pencilCreatesAxes, updateIns).execute();
    final TicksStyle style = shapeTicks.getSelectionModel().getSelectedItem();
    Cmds.of(selectTicksStyle).execute();
    final TicksStyle newStyle = shapeTicks.getSelectionModel().getSelectedItem();
    assertEquals(newStyle, ((AxesProp) editing.createShapeInstance()).getTicksStyle());
    assertNotEquals(style, newStyle);
}
Also used : TicksStyle(net.sf.latexdraw.model.api.shape.TicksStyle) Test(org.junit.Test)

Example 2 with TicksStyle

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

the class TestHandAxeStyle method testSelectTicksStyleSelection.

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

Aggregations

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