Search in sources :

Example 1 with ArrowableSingleShape

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

the class TestParsingArrow method testNonecc.

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

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

the class TestParsingArrow method testArrowcNone.

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

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

the class TestParsingArrow method testDbleArrowLeftDbleArrowRight.

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

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

the class TestParsingArrow method testNoneLeftRoundBracket.

@ParameterizedTest
@MethodSource("cmds")
public void testNoneLeftRoundBracket(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.RIGHT_ROUND_BRACKET, 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 5 with ArrowableSingleShape

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

the class TestParsingArrow method testCircleInNone.

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

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