Search in sources :

Example 61 with ArrowableSingleShape

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

the class TestParsingArrow method testArrowheadRightArrowheadLeft.

@ParameterizedTest
@MethodSource("cmds")
public void testArrowheadRightArrowheadLeft(final Tuple<String, String> cmd) {
    parser(cmd.a + "{>-<}" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(0));
    assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(1));
}
Also used : ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 62 with ArrowableSingleShape

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

the class TestParsingArrow method testParamArrows.

@ParameterizedTest
@MethodSource("cmds")
public void testParamArrows(final Tuple<String, String> cmd) {
    parser(cmd.a + "[arrows=<->]" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(0));
    assertEquals(ArrowStyle.RIGHT_ARROW, line.getArrowStyle(1));
}
Also used : ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 63 with ArrowableSingleShape

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

the class TestParsingArrow method testDiskInNone.

@ParameterizedTest
@MethodSource("cmds")
public void testDiskInNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{**-}" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.DISK_IN, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Also used : ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 64 with ArrowableSingleShape

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

the class TestParsingArrow method testNoneNone.

@ParameterizedTest
@MethodSource("cmds")
public void testNoneNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{-}" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Also used : ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 65 with ArrowableSingleShape

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

the class TestParsingArrow method testNoneArrowheadLeft.

@ParameterizedTest
@MethodSource("cmds")
public void testNoneArrowheadLeft(final Tuple<String, String> cmd) {
    parser(cmd.a + "{-<}" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.LEFT_ARROW, line.getArrowStyle(1));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
}
Also used : ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

ArrowableSingleShape (net.sf.latexdraw.model.api.shape.ArrowableSingleShape)89 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)55 MethodSource (org.junit.jupiter.params.provider.MethodSource)55 ArrowStyle (net.sf.latexdraw.model.api.shape.ArrowStyle)34 Test (org.junit.Test)34 Axes (net.sf.latexdraw.model.api.shape.Axes)7