From 825418d520c46cc8e3109cd599eac34da192ef5a Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Fri, 28 Dec 2018 11:17:52 +0000 Subject: [PATCH] Adjust test to not require src/documentation to be available git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1849837 13f79535-47bb-0310-9956-ffa450edef68 --- .../xslf/usermodel/TestXSLFPictureShape.java | 4 +- test-data/project-header.svg | 1108 +++++++++++++++++ 2 files changed, 1109 insertions(+), 3 deletions(-) create mode 100644 test-data/project-header.svg diff --git a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java index 82d1587fe6..a2caca6feb 100644 --- a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java +++ b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFPictureShape.java @@ -257,12 +257,10 @@ public class TestXSLFPictureShape { @Test public void renderSvgImage() throws Exception { - String dataDirName = System.getProperty(TEST_PROPERTY); - final String SVG_FILE = (dataDirName != null ? "../" : "") + "src/documentation/resources/images/project-header.svg"; XMLSlideShow ppt = new XMLSlideShow(); XSLFSlide slide = ppt.createSlide(); - XSLFPictureData svgPic = ppt.addPicture(new File(dataDirName, SVG_FILE), PictureType.SVG); + XSLFPictureData svgPic = ppt.addPicture(POIDataSamples.getDocumentInstance().getFile("../project-header.svg"), PictureType.SVG); XSLFPictureShape shape = XSLFPictureShape.addSvgImage(slide, svgPic, PictureType.JPEG, null); Rectangle2D anchor = shape.getAnchor(); diff --git a/test-data/project-header.svg b/test-data/project-header.svg new file mode 100644 index 0000000000..b5d65e8cd9 --- /dev/null +++ b/test-data/project-header.svg @@ -0,0 +1,1108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.39.5