Fix export unit tests.

This commit is contained in:
Paulo Gustavo Veiga 2013-03-10 19:55:40 -03:00
parent b6ee7e61b8
commit e03f5f632b
22 changed files with 11 additions and 17 deletions

View File

@ -4,19 +4,13 @@ import com.wisemapping.exporter.ExportException;
import com.wisemapping.exporter.ExportFormat;
import com.wisemapping.exporter.ExportProperties;
import com.wisemapping.exporter.ExporterFactory;
import com.wisemapping.importer.ImporterException;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.commons.io.FileUtils;
import org.jetbrains.annotations.NotNull;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import org.xml.sax.SAXException;
import javax.xml.bind.JAXBException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLStreamException;
import javax.xml.transform.TransformerException;
import java.io.*;
@Test
@ -98,7 +92,7 @@ public class ExportTest {
final File[] svgFile = dataDir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.endsWith(".svg");
return name.endsWith(".svg") && !name.contains( "-exp.svg");
}
});

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="1499.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-724.0 -746.0 1474.0 1499.0" width="1474.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="1499.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-724.0 -746.0 1474.0 1499.0" width="1474.0">
<path d="M-158,567 C-168,567 -178,689 -188,689" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:none " visibility="visible"/>
<path d="M-158,567 C-168,567 -178,662 -188,662" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:none " visibility="visible"/>
<path d="M-158,567 C-168,567 -178,635 -188,635" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:none " visibility="visible"/>

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 157 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="665.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-589.0 -329.0 1250.0 665.0" width="1250.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="665.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-589.0 -329.0 1250.0 665.0" width="1250.0">
<path d="M-384,78 C-393,78 -404,92 -413,92" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:none " visibility="visible"/>
<path d="M-384,78 C-393,78 -403,63 -412,63" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:none " visibility="visible"/>
<path d="M-196,78 C-205,78 -216,77 -225,77" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:none " visibility="visible"/>

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="2651.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-1332.0 -789.0 2836.0 2651.0" width="2836.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="2651.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-1332.0 -789.0 2836.0 2651.0" width="2836.0">
<path d="M-318,1380 C-91.33333333333331,1390.3333333333333 135.33333333333331,1400.6666666666667 362,1411" stroke="#3f96ff" stroke-opacity="1" stroke-width="2px" style="fill:none " visibility="hidden"/>
<path d="M-318,1414 L-313.67703992075633,1409.8392288991984M-318,1414 L-313.8392288991984,1418.3229600792436" stroke="#9b74e6" stroke-opacity="1" stroke-width="2px" visibility="visible"/>
<path d="M716,674 C346,845 -668,871 -741,968" stroke="#3f96ff" stroke-opacity="1" stroke-width="2px" style="fill:none " visibility="hidden"/>

Before

Width:  |  Height:  |  Size: 510 KiB

After

Width:  |  Height:  |  Size: 510 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="308.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-341.0 -151.0 527.0 308.0" width="527.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="308.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-341.0 -151.0 527.0 308.0" width="527.0">
<path d="M0,0 C-20,0 -41,101 -61,101 -41,104 -20,5 0,7 Z" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:#495879 " visibility="visible"/>
<path d="M-132,45 C-141,45 -152,68 -161,68" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:none " visibility="visible"/>
<path d="M-212,29 C-221,29 -232,41 -241,41" fill="#495879" fill-opacity="1" stroke="#495879" stroke-opacity="1" stroke-width="1px" style="fill:none " visibility="visible"/>

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="411.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-650.0 -193.0 1076.0 411.0" width="1076.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="411.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-650.0 -193.0 1076.0 411.0" width="1076.0">
<polyline fill="none" points="-492,161.5 -599.5,160.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>
<polyline fill="none" points="-348,150 -358,150 -358,156.5 -363,161.5 -491,161.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>
<polyline fill="none" points="-348,150 -358,150 -358,139.5 -363,134.5 -489.5,134.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="2382.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-1131.0 -1134.0 2173.0 2382.0" width="2173.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="2382.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-1131.0 -1134.0 2173.0 2382.0" width="2173.0">
<polyline fill="none" points="645.0, 85.0 760.0, 84.0" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>
<polyline fill="none" points="531.0, 23.0 541.0, 23.0 541.0, 80.0 546.0, 85.0 644.0, 85.0" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>
<polyline fill="none" points="531.0, 23.0 541.0, 23.0 541.0, 53.0 546.0, 58.0 738.5, 58.0" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="464.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-696.0 -246.0 1220.0 464.0" width="1220.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="464.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-696.0 -246.0 1220.0 464.0" width="1220.0">
<polyline fill="none" points="306,51.5 316,51.5 316,69.5 321,74.5 353.5,74.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>
<polyline fill="none" points="306,51.5 361.5,50.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>
<polyline fill="none" points="306,51.5 316,51.5 316,31.5 321,26.5 377,26.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="464.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-731.0 -246.0 1269.0 464.0" width="1269.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="464.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-731.0 -246.0 1269.0 464.0" width="1269.0">
<polyline fill="none" points="320,51.5 330,51.5 330,69.5 335,74.5 367.5,74.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>
<polyline fill="none" points="320,51.5 375.5,50.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>
<polyline fill="none" points="320,51.5 330,51.5 330,31.5 335,26.5 391,26.5" stroke="#495879" stroke-opacity="1" stroke-width="1px" visibility="visible"/>

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="151.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-224.0 -101.0 274.0 151.0" width="274.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="151.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-224.0 -101.0 274.0 151.0" width="274.0">
<path d="M0,0 C-38,0 -54,-40 -92,-40" fill-opacity="1.0999999999999999" stroke="#495879" stroke-opacity="1.0999999999999999" stroke-width="1px" style="fill: none;" visibility="visible"/>
<g focusable="true" height="100" preserveAspectRatio="none" transform="translate(-23, -17) scale(1)" visibility="visible" width="100">
<rect fill="#dbe2e6" fill-opacity="0" height="41" rx="6.1499999999999995" ry="6.1499999999999995" stroke="#77555a" stroke-opacity="0" stroke-width="1px" style="cursor: default;" width="50" x="-2" y="-3"/>

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="1595.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-869.0 -830.0 3515.0 1595.0" width="3515.0">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" focusable="true" height="1595.0" id="workspace" preserveAspectRatio="xMinYMin" viewBox="-869.0 -830.0 3515.0 1595.0" width="3515.0">
<path stroke="#3f96ff" stroke-opacity="1" stroke-width="2px" style="fill:none " visibility="hidden"/>
<path d="M1517,159 L1518.3491570401925,153.15365282583227M1517,159 L1522.8463471741677,160.34915704019255" stroke="#9b74e6" stroke-opacity="1" stroke-width="2px" visibility="visible"/>
<path stroke="#3f96ff" stroke-opacity="1" stroke-width="2px" style="fill:none " visibility="hidden"/>

Before

Width:  |  Height:  |  Size: 381 KiB

After

Width:  |  Height:  |  Size: 381 KiB