Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nroduit committed Dec 13, 2023
1 parent a4e592f commit 220429e
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class AnnotationGraphicTest extends GraphicTester<AnnotationGraphic> {
private static final String XML_1 = "/graphic/annotation/annotation.graphic.1.xml"; // NON-NLS

static final String BASIC_TPL =
"<annotation fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<annotation fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</annotation>"; // NON-NLS
Expand Down Expand Up @@ -58,6 +58,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class PixelInfoGraphicTest extends GraphicTester<PixelInfoGraphic> {
private static final String XML_1 = "/graphic/pixel/pixel.graphic.1.xml"; // NON-NLS

static final String BASIC_TPL =
"<pixelInfo fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<pixelInfo fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</pixelInfo>"; // NON-NLS
Expand Down Expand Up @@ -58,6 +58,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class PointGraphicTest extends GraphicTester<PointGraphic> {
private static final String XML_1 = "/graphic/point/point.graphic.1.xml"; // NON-NLS

static final String BASIC_TPL =
"<point pointSize=\"%s\" fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<point pointSize=\"%s\" fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</point>"; // NON-NLS
Expand Down Expand Up @@ -52,6 +52,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class AngleToolGraphicTest extends GraphicTester<AngleToolGraphic> {
private static final String XML_1 = "/graphic/angle/angle.graphic.1.xml"; // NON-NLS

public static final String BASIC_TPL =
"<angle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<angle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</angle>"; // NON-NLS
Expand Down Expand Up @@ -50,6 +50,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class CobbAngleToolGraphicTest extends GraphicTester<CobbAngleToolGraphic
private static final String XML_1 = "/graphic/cobbAngle/cobbAngle.graphic.1.xml"; // NON-NLS

public static final String BASIC_TPL =
"<cobbAngle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<cobbAngle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</cobbAngle>"; // NON-NLS
Expand Down Expand Up @@ -52,6 +52,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class FourPointsAngleToolGraphicTest extends GraphicTester<FourPointsAngl
"/graphic/fourPointsAngle/fourPointsAngle.graphic.1.xml"; // NON-NLS

public static final String BASIC_TPL =
"<fourPointsAngle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<fourPointsAngle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</fourPointsAngle>"; // NON-NLS
Expand Down Expand Up @@ -57,6 +57,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class OpenAngleToolGraphicTest extends GraphicTester<OpenAngleToolGraphic
private static final String XML_1 = "/graphic/openAngle/openAngle.graphic.1.xml"; // NON-NLS

public static final String BASIC_TPL =
"<openAngle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<openAngle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</openAngle>"; // NON-NLS
Expand Down Expand Up @@ -51,6 +51,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class EllipseGraphicTest extends GraphicTester<EllipseGraphic> {
private static final String XML_1 = "/graphic/ellipse/ellipse.graphic.1.xml"; // NON-NLS

public static final String BASIC_TPL =
"<ellipse fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<ellipse fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</ellipse>"; // NON-NLS
Expand Down Expand Up @@ -51,6 +51,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class PolygonGraphicTest extends GraphicTester<PolygonGraphic> {
private static final String XML_1 = "/graphic/polygon/polygon.graphic.1.xml"; // NON-NLS

public static final String BASIC_TPL =
"<polygon fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<polygon fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</polygon>"; // NON-NLS
Expand Down Expand Up @@ -55,6 +55,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class RectangleGraphicTest extends GraphicTester<ObliqueRectangleGraphic>
private static final String XML_1 = "/graphic/rectangle/rectangle.graphic.1.xml"; // NON-NLS

public static final String BASIC_TPL =
"<rectangle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<rectangle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</rectangle>"; // NON-NLS
Expand Down Expand Up @@ -52,6 +52,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class ThreePointsCircleGraphicTest extends GraphicTester<ThreePointsCircl
"/graphic/threePointsCircle/threePointsCircle.graphic.1.xml"; // NON-NLS

static final String BASIC_TPL =
"<threePointsCircle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<threePointsCircle fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</threePointsCircle>"; // NON-NLS
Expand Down Expand Up @@ -53,6 +53,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class LineGraphicTest extends GraphicTester<LineGraphic> {
private static final String XML_1 = "/graphic/line/line.graphic.1.xml"; // NON-NLS

public static final String BASIC_TPL =
"<line fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<line fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</line>"; // NON-NLS
Expand All @@ -49,6 +49,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class LineWithGapGraphicTest extends GraphicTester<LineWithGapGraphic> {
private static final String XML_1 = "/graphic/lineWithGap/lineWithGap.graphic.1.xml"; // NON-NLS

static final String BASIC_TPL =
"<lineWithGap gapSize=\"%s\" fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<lineWithGap gapSize=\"%s\" fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</lineWithGap>"; // NON-NLS
Expand Down Expand Up @@ -52,6 +52,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ParallelLineGraphicTest extends GraphicTester<ParallelLineGraphic>
private static final String XML_1 = "/graphic/parallelLine/parallelLine.graphic.1.xml"; // NON-NLS

static final String BASIC_TPL =
"<parallelLine fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<parallelLine fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</parallelLine>"; // NON-NLS
Expand Down Expand Up @@ -56,6 +56,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class PerpendicularLineGraphicTest extends GraphicTester<PerpendicularLin
"/graphic/perpendicularLine/perpendicularLine.graphic.1.xml"; // NON-NLS

static final String BASIC_TPL =
"<perpendicularLine fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<perpendicularLine fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</perpendicularLine>"; // NON-NLS
Expand Down Expand Up @@ -53,6 +53,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class PolylineGraphicTest extends GraphicTester<PolylineGraphic> {
private static final String XML_1 = "/graphic/polyline/polyline.graphic.1.xml"; // NON-NLS

static final String BASIC_TPL =
"<polyline fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" uuid=\"%s\">" // NON-NLS
"<polyline fill=\"%s\" showLabel=\"%s\" thickness=\"%s\" insideOpacity=\"%s\" uuid=\"%s\">" // NON-NLS
+ "<paint rgb=\"%s\"/>" // NON-NLS
+ "<pts/>" // NON-NLS
+ "</polyline>"; // NON-NLS
Expand Down Expand Up @@ -60,6 +60,7 @@ public Object[] getParameters() {
Graphic.DEFAULT_FILLED,
Graphic.DEFAULT_LABEL_VISIBLE,
Graphic.DEFAULT_LINE_THICKNESS,
Graphic.DEFAULT_INTERIOR_OPACITY,
getGraphicUuid(),
WProperties.color2Hexadecimal(Graphic.DEFAULT_COLOR, true)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void test_add_one_point_graphic() throws Exception {
+ "<layer level=\"40\" locked=\"false\" selectable=\"true\" type=\"DRAW\" visible=\"true\" uuid=\"%2$s\"/>" // NON-NLS
+ "</layers>" // NON-NLS
+ "<graphics>" // NON-NLS
+ "<point pointSize=\"1\" fill=\"false\" showLabel=\"true\" thickness=\"3.0\" " // NON-NLS
+ "<point pointSize=\"1\" fill=\"false\" showLabel=\"true\" thickness=\"3.0\" insideOpacity=\"1.0\" " // NON-NLS
+ "uuid=\"%3$s\">" // NON-NLS
+ "<paint rgb=\"ffff0000\"/>" // NON-NLS
+ "<layer>%2$s</layer>" // NON-NLS
Expand Down

0 comments on commit 220429e

Please sign in to comment.