Search in sources :

Example 26 with ArrowableSingleShape

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

the class PolymorphArrowableTest method testArrowCircleDiskParamsArr2.

@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowCircleDiskParamsArr2(final ArrowableSingleShape sh, final ArrowStyle arr) {
    assumeTrue(arr.isCircleDisk());
    assumeFalse(sh instanceof Axes);
    sh.setArrowStyle(arr, 0);
    final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowCircleDisk(sh.getArrowAt(1), s2.getArrowAt(1));
}
Also used : Axes(net.sf.latexdraw.model.api.shape.Axes) ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 27 with ArrowableSingleShape

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

the class PolymorphArrowableTest method testArrowBracketParamsArr1.

@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowBracketParamsArr1(final ArrowableSingleShape sh, final ArrowStyle arr) {
    assumeTrue(arr.isSquareBracket());
    assumeFalse(sh instanceof Axes);
    sh.setArrowStyle(arr, 0);
    sh.setArrowStyle(ArrowStyle.LEFT_ARROW, 1);
    final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowBracket(sh.getArrowAt(0), s2.getArrowAt(0));
}
Also used : Axes(net.sf.latexdraw.model.api.shape.Axes) ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 28 with ArrowableSingleShape

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

the class PolymorphArrowableTest method testArrowBracketParamsArr2.

@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowBracketParamsArr2(final ArrowableSingleShape sh, final ArrowStyle arr) {
    assumeTrue(arr.isSquareBracket());
    assumeFalse(sh instanceof Axes);
    sh.setArrowStyle(arr, 1);
    final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowBracket(sh.getArrowAt(1), s2.getArrowAt(1));
}
Also used : Axes(net.sf.latexdraw.model.api.shape.Axes) ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 29 with ArrowableSingleShape

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

the class PolymorphArrowableTest method testArrowBarParamsArr2.

@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowBarParamsArr2(final ArrowableSingleShape sh, final ArrowStyle arr) {
    assumeTrue(arr.isBar());
    assumeFalse(sh instanceof Axes);
    sh.setArrowStyle(ArrowStyle.ROUND_END, 0);
    sh.setArrowStyle(arr, 1);
    final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowBar(sh.getArrowAt(1), s2.getArrowAt(1));
}
Also used : Axes(net.sf.latexdraw.model.api.shape.Axes) ArrowableSingleShape(net.sf.latexdraw.model.api.shape.ArrowableSingleShape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 30 with ArrowableSingleShape

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

the class PolymorphArrowableTest method testArrowRBracketParamsArr2.

@ParameterizedTest
@MethodSource("arrowsParamsDiv")
default void testArrowRBracketParamsArr2(final ArrowableSingleShape sh, final ArrowStyle arr) {
    assumeTrue(arr.isRoundBracket());
    assumeFalse(sh instanceof Axes);
    sh.setArrowStyle(arr, 0);
    final ArrowableSingleShape s2 = produceOutputShapeFrom(sh);
    CompareShapeMatcher.INST.assertEqualsArrowRBracket(sh.getArrowAt(0), s2.getArrowAt(1));
}
Also used : Axes(net.sf.latexdraw.model.api.shape.Axes) 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