Search in sources :

Example 1 with StandardGrid

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

the class TestStandardGridBase method testDuplicate.

@Theory
public void testDuplicate(@StdGridData final StandardGrid shape) {
    shape.setOrigin(20, 30);
    shape.setGridStart(-100, -40);
    shape.setGridEnd(200, 300);
    shape.setLabelsSize(12);
    final StandardGrid dup = shape.duplicate();
    assertEqualsDouble(20., dup.getOriginX());
    assertEqualsDouble(30., dup.getOriginY());
    assertEqualsDouble(-100., dup.getGridStartX());
    assertEqualsDouble(-40., dup.getGridStartY());
    assertEqualsDouble(200., dup.getGridEndX());
    assertEqualsDouble(300., dup.getGridEndY());
    assertEquals(12, dup.getLabelsSize());
}
Also used : StandardGrid(net.sf.latexdraw.model.api.shape.StandardGrid) Theory(org.junit.experimental.theories.Theory)

Example 2 with StandardGrid

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

the class PolymorphStdGridTest method testStdGridParams.

@ParameterizedTest
@MethodSource("net.sf.latexdraw.data.StdGridSupplier#createDiversifiedStdGrids")
default void testStdGridParams(final StandardGrid sh) {
    final StandardGrid s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsStdGrid(sh, s2);
}
Also used : StandardGrid(net.sf.latexdraw.model.api.shape.StandardGrid) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

StandardGrid (net.sf.latexdraw.model.api.shape.StandardGrid)2 Theory (org.junit.experimental.theories.Theory)1 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)1 MethodSource (org.junit.jupiter.params.provider.MethodSource)1