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
This commit is contained in:
Dominik Stadler 2018-12-28 11:17:52 +00:00
parent a6e9421d18
commit 825418d520
2 changed files with 1109 additions and 3 deletions

View File

@ -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();

1108
test-data/project-header.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 72 KiB