Search in sources :

Example 71 with Shape

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

the class TestParsingShape method testParamGradend.

@ParameterizedTest
@MethodSource(value = "cmds")
void testParamGradend(final Tuple<String, String> cmd) {
    parser(cmd.a + "[fillstyle=gradient, gradend=blue]" + cmd.b);
    final Shape sh = getShapeAt(0);
    assumeTrue(sh.isInteriorStylable());
    assertEquals(DviPsColors.BLUE, sh.getGradColEnd());
}
Also used : Shape(net.sf.latexdraw.model.api.shape.Shape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 72 with Shape

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

the class TestStarredCommand method testShadow.

@ParameterizedTest
@MethodSource("cmds")
void testShadow(final String cmd) {
    parser(cmd);
    final Shape sh = getShapeAt(0);
    assumeTrue(sh.isShadowable());
    assertFalse(sh.hasShadow());
}
Also used : Shape(net.sf.latexdraw.model.api.shape.Shape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 73 with Shape

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

the class TestStarredCommand method testFillStyle.

@ParameterizedTest
@MethodSource("cmds")
void testFillStyle(final String cmd) {
    parser(cmd);
    final Shape sh = getShapeAt(0);
    assumeTrue(sh.isInteriorStylable());
    assertEquals(FillingStyle.PLAIN, sh.getFillingStyle());
}
Also used : Shape(net.sf.latexdraw.model.api.shape.Shape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 74 with Shape

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

the class TestStarredCommand method testDbleBord.

@ParameterizedTest
@MethodSource("cmds")
void testDbleBord(final String cmd) {
    parser(cmd);
    final Shape sh = getShapeAt(0);
    assumeTrue(sh.isDbleBorderable());
    assertFalse(sh.hasDbleBord());
}
Also used : Shape(net.sf.latexdraw.model.api.shape.Shape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Example 75 with Shape

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

the class TestStarredCommand method testFilled.

@ParameterizedTest
@MethodSource("cmds")
void testFilled(final String cmd) {
    parser(cmd);
    final Shape sh = getShapeAt(0);
    assumeTrue(sh.isFillable());
    assertTrue(sh.isFilled());
}
Also used : Shape(net.sf.latexdraw.model.api.shape.Shape) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) MethodSource(org.junit.jupiter.params.provider.MethodSource)

Aggregations

Shape (net.sf.latexdraw.model.api.shape.Shape)75 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)43 MethodSource (org.junit.jupiter.params.provider.MethodSource)41 Test (org.junit.Test)12 Point (net.sf.latexdraw.model.api.shape.Point)8 PositionShape (net.sf.latexdraw.model.api.shape.PositionShape)7 HelperTest (net.sf.latexdraw.HelperTest)6 ShapeFactory (net.sf.latexdraw.model.ShapeFactory)6 Circle (net.sf.latexdraw.model.api.shape.Circle)6 RectangularShape (net.sf.latexdraw.model.api.shape.RectangularShape)6 NotNull (org.jetbrains.annotations.NotNull)6 Click (io.github.interacto.jfx.interaction.library.Click)5 ArrayList (java.util.ArrayList)5 Objects (java.util.Objects)5 MathUtils (net.sf.latexdraw.model.MathUtils)5 Rectangle (net.sf.latexdraw.model.api.shape.Rectangle)5 Inject (net.sf.latexdraw.util.Inject)5 CommandsRegistry (io.github.interacto.command.CommandsRegistry)3 Redo (io.github.interacto.command.library.Redo)3 Undo (io.github.interacto.command.library.Undo)3