Search in sources :

Example 21 with ArrowableSingleShape

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

the class TestParsingArrow method testTbarEndNone.

@ParameterizedTest
@MethodSource("cmds")
public void testTbarEndNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{|*-}" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.BAR_END, 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 22 with ArrowableSingleShape

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

the class TestParsingArrow method testParamArrowsRRBracker.

@ParameterizedTest
@MethodSource("cmds")
public void testParamArrowsRRBracker(final Tuple<String, String> cmd) {
    parser(cmd.a + "[arrows=)-]" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.RIGHT_ROUND_BRACKET, 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 23 with ArrowableSingleShape

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

the class TestParsingArrow method testArrowheadRightNone.

@ParameterizedTest
@MethodSource("cmds")
public void testArrowheadRightNone(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.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 24 with ArrowableSingleShape

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

the class TestParsingArrow method testNoneC.

@ParameterizedTest
@MethodSource("cmds")
public void testNoneC(final Tuple<String, String> cmd) {
    parser(cmd.a + "{-C}" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
    assertEquals(ArrowStyle.SQUARE_END, 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 25 with ArrowableSingleShape

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

the class TestParsingArrow method testSquareLeftBracketNone.

@ParameterizedTest
@MethodSource("cmds")
public void testSquareLeftBracketNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{]-}" + cmd.b);
    final ArrowableSingleShape line = (ArrowableSingleShape) parsedShapes.get(0);
    assertEquals(ArrowStyle.RIGHT_SQUARE_BRACKET, 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)

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