Change icons path location.

This commit is contained in:
Paulo Veiga 2012-01-31 00:14:49 -03:00
parent 68fdf41bb7
commit ba24e02d85
3 changed files with 11 additions and 6 deletions

View File

@ -34,6 +34,12 @@
<version>3.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wisemapping</groupId>
<artifactId>wise-editor</artifactId>
<version>3.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wisemapping</groupId>
<artifactId>mindplot</artifactId>

View File

@ -32,7 +32,7 @@ public class ExportTest {
reader = new BufferedReader(new FileReader(svgFile));
String text;
while((text=reader.readLine()) != null){
while ((text = reader.readLine()) != null) {
buffer.append(text).append(System.getProperty("line.separator"));
}
@ -42,11 +42,11 @@ public class ExportTest {
final ExportProperties properties = ExportProperties.create(format);
final ExportProperties.ImageProperties imageProperties = (ExportProperties.ImageProperties) properties;
imageProperties.setSize(ExportProperties.ImageProperties.Size.LARGE);
String baseUrl = "file://"+svgFile.getParentFile().getAbsolutePath()+"/../../../main/webapp/icons";
String baseUrl = "file://" + svgFile.getParentFile().getAbsolutePath() + "/../../../../../wise-editor/src/main/webapp/icons";
properties.setBaseImagePath(baseUrl);
// Write content ...
if(pngFile.exists()){
if (pngFile.exists()) {
// Export mile content ...
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
ExporterFactory.export(imageProperties, null, bos, svgXml);
@ -78,8 +78,7 @@ public class ExportTest {
Assert.assertEquals(expContent.toString().trim(), expContent.toString().trim());
}
else{
} else {
OutputStream outputStream = new FileOutputStream(pngFile, false);
ExporterFactory.export(imageProperties, null, outputStream, svgXml);
outputStream.close();

View File

@ -29,7 +29,7 @@ public class IconsTest {
final List<MindmapIcon> iconByFamily = MindmapIcons.getIconByFamily(family);
for (MindmapIcon mindmapIcon : iconByFamily) {
final String pngName = mindmapIcon.getId() + ".png";
final File file = new File("src/main/webapp/icons/", pngName);
final File file = new File("../wise-editor/src/main/webapp/icons/", pngName);
Assert.assertTrue(file.exists(), "Could not be found:" + file.getAbsolutePath());
}