use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphAxesTest method testAxesStyle.
@ParameterizedTest
@EnumSource(AxesStyle.class)
default void testAxesStyle(final AxesStyle style) {
final Axes sh = ShapeSupplier.createAxes();
sh.setAxesStyle(style);
final Axes s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsAxes(sh, s2);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphAxesTest method testTicksStyle.
@ParameterizedTest
@EnumSource(TicksStyle.class)
default void testTicksStyle(final TicksStyle style) {
final Axes sh = ShapeSupplier.createAxes();
sh.setTicksStyle(style);
final Axes s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsAxes(sh, s2);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphAxesTest method testAxesParams.
@ParameterizedTest
@MethodSource("net.sf.latexdraw.data.ShapeSupplier#createDiversifiedAxes")
default void testAxesParams(final Axes sh) {
final Axes s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsAxes(sh, s2);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class TestCanvasCreation method testDrawAxes.
@Test
public void testDrawAxes() {
final Point2D pos = point(canvas).query();
Cmds.of(CmdFXVoid.of(() -> editing.setCurrentChoice(EditionChoice.AXES)), () -> moveTo(pos).clickOn(MouseButton.PRIMARY)).execute();
assertEquals(1, drawing.size());
assertTrue(drawing.getShapeAt(0).orElseThrow() instanceof Axes);
final Axes sh = (Axes) drawing.getShapeAt(0).orElseThrow();
assertEquals(-Canvas.getMargins() + canvas.screenToLocal(pos).getX(), sh.getPosition().getX(), 1d);
assertEquals(-Canvas.getMargins() + canvas.screenToLocal(pos).getY(), sh.getPosition().getY(), 1d);
}
use of net.sf.latexdraw.model.api.shape.Axes in project latexdraw by arnobl.
the class PolymorphAxesTest method testTicksDisplayed.
@ParameterizedTest
@EnumSource(PlottingStyle.class)
default void testTicksDisplayed(final PlottingStyle style) {
final Axes sh = ShapeSupplier.createAxes();
sh.setTicksDisplayed(style);
final Axes s2 = produceOutputShapeFrom(sh);
CompareShapeMatcher.INST.assertEqualsAxes(sh, s2);
}
Aggregations