Search in sources :

Example 66 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testTbarNone.

@Theory
public void testTbarNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{|-}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.BAR_IN, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 67 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testNoneDiskIn.

@Theory
public void testNoneDiskIn(final Tuple<String, String> cmd) {
    parser(cmd.a + "{-**}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
    assertEquals(ArrowStyle.DISK_IN, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 68 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testNoneTbarEnd.

@Theory
public void testNoneTbarEnd(final Tuple<String, String> cmd) {
    parser(cmd.a + "{-|*}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(0));
    assertEquals(ArrowStyle.BAR_END, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 69 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testParamArrowsBarEnd.

@Theory
public void testParamArrowsBarEnd(final Tuple<String, String> cmd) {
    parser(cmd.a + "[arrows=|*-]" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.BAR_END, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 70 with IArrowableSingleShape

use of net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape in project latexdraw by arnobl.

the class TestParsingArrow method testArrowcNone.

@Theory
public void testArrowcNone(final Tuple<String, String> cmd) {
    parser(cmd.a + "{c-}" + cmd.b);
    final IArrowableSingleShape line = (IArrowableSingleShape) listener.getShapes().get(0);
    assertEquals(ArrowStyle.ROUND_END, line.getArrowStyle(0));
    assertEquals(ArrowStyle.NONE, line.getArrowStyle(1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Aggregations

IArrowableSingleShape (net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape)93 Theory (org.junit.experimental.theories.Theory)57 ArrowStyle (net.sf.latexdraw.models.interfaces.shape.ArrowStyle)36 CompositeGUIVoidCommand (net.sf.latexdraw.instruments.CompositeGUIVoidCommand)34 Test (org.junit.Test)34 IAxes (net.sf.latexdraw.models.interfaces.shape.IAxes)10