Search in sources :

Example 6 with ArrowableSingleShape

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

the class TestParsingArrow method testNoneRightRoundBracket.

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

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

the class TestParsingArrow method testCcNone.

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

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

the class TestParsingArrow method testNoneTbar.

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

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

the class TestParsingArrow method testNoneCircleIn.

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

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

the class TestParsingArrow method testDiskEndNone.

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

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