Search in sources :

Example 91 with IArrowableSingleShape

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

the class TestSVGArrowable method testArrowCircleDiskParamsArr2.

@Theory
public void testArrowCircleDiskParamsArr2(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
    assumeTrue(arr1.isCircleDisk());
    assumeFalse(sh instanceof IAxes);
    sh.setArrowStyle(arr1, 0);
    sh.setArrowStyle(arr2, -1);
    final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowCircleDisk(sh.getArrowAt(-1), s2.getArrowAt(-1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) IAxes(net.sf.latexdraw.models.interfaces.shape.IAxes) Theory(org.junit.experimental.theories.Theory)

Example 92 with IArrowableSingleShape

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

the class TestSVGArrowable method testArrowStyle.

@Theory
public void testArrowStyle(@ArrowableData final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
    sh.setArrowStyle(arr1, 0);
    sh.setArrowStyle(arr2, -1);
    final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowStyle(sh.getArrowAt(0), s2.getArrowAt(0));
    CompareShapeMatcher.INST.assertEqualsArrowStyle(sh.getArrowAt(-1), s2.getArrowAt(-1));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) Theory(org.junit.experimental.theories.Theory)

Example 93 with IArrowableSingleShape

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

the class TestSVGArrowable method testArrowBarParamsArr1.

@Theory
public void testArrowBarParamsArr1(@ArrowableData(withParamVariants = true) final IArrowableSingleShape sh, final ArrowStyle arr1, final ArrowStyle arr2) {
    assumeTrue(arr1.isBar());
    assumeFalse(sh instanceof IAxes);
    sh.setArrowStyle(arr1, 0);
    sh.setArrowStyle(arr2, -1);
    final IArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowBar(sh.getArrowAt(0), s2.getArrowAt(0));
}
Also used : IArrowableSingleShape(net.sf.latexdraw.models.interfaces.shape.IArrowableSingleShape) IAxes(net.sf.latexdraw.models.interfaces.shape.IAxes) 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