Fix tests.

This commit is contained in:
Paulo Gustavo Veiga
2011-07-03 12:13:31 -03:00
parent 9517f06902
commit 5ace7f5259
14 changed files with 23 additions and 26 deletions

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><map version="0.9.0"><node wCOORDS="0,0" TEXT="eeeeeeeeeee" ID="ID_0" COLOR="#000000"><font SIZE="10" NAME="Arial"/><hook NAME="accessories/plugins/NodeNote.properties"><text>
</text></hook><node wORDER="7" wCOORDS="200,-200" TEXT="interne" POSITION="right" ID="ID_1" COLOR="#cc0000"><font SIZE="12" NAME="Arial" ITALIC="true" BOLD="true"/><node wORDER="0" wCOORDS="290,-225" TEXT="faiblesses" POSITION="right" ID="ID_2" COLOR="#330033"><font SIZE="12" NAME="Arial" ITALIC="true" BOLD="true"/></node></node><node wORDER="3" wCOORDS="200,-100" TEXT="www.luxuo.com" POSITION="right" LINK="www.luxuo.com" ID="ID_3"><arrowlink ENDARROW="Default" DESTINATION="ID_6"/></node><node wORDER="0" wCOORDS="200,0" TEXT="" POSITION="right" ID="ID_4"/><node wORDER="4" wCOORDS="200,100" TEXT="forces" POSITION="right" ID="ID_5" COLOR="#003333"><font SIZE="12" NAME="Arial" ITALIC="true" BOLD="true"/></node><node wORDER="8" wCOORDS="200,200" TEXT="" POSITION="right" ID="ID_6"><hook NAME="accessories/plugins/NodeNote.properties"><text>%5El%3A%5El%3A%5El
</text></hook></node><node wORDER="12" wCOORDS="200,300" TEXT="" POSITION="right" ID="ID_7"><node wORDER="0" wCOORDS="290,275" TEXT="externe" POSITION="right" ID="ID_8" COLOR="#000066"><font SIZE="12" NAME="Arial" ITALIC="true" BOLD="true"/><node wORDER="0" wCOORDS="380,250" TEXT="opportunit?s" POSITION="right" ID="ID_9" COLOR="#ff3300"><font SIZE="12" NAME="Arial" ITALIC="true" BOLD="true"/></node><node wORDER="1" wCOORDS="380,275" TEXT="menaces" POSITION="right" ID="ID_10" COLOR="#333300"><font SIZE="12" NAME="Arial" ITALIC="true" BOLD="true"/><arrowlink ENDARROW="Default" DESTINATION="ID_0"/></node></node><arrowlink ENDARROW="Default" DESTINATION="ID_5"/></node></node></map>

View File

@@ -1 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><map version="pela" name="basic"><topic id="0" central="true" position="0,0" fontStyle="Arial;10;#000000;;;" shape="rounded rectagle" text="eeeeeeeeeee"><note text="%0A "/><topic id="1" position="200,-200" order="7" fontStyle="Arial;12;#cc0000;bold;italic;" shape="line" text="interne"><topic id="2" position="290,-225" order="0" fontStyle="Arial;12;#330033;bold;italic;" shape="line" text="faiblesses"/></topic><topic id="3" position="200,-100" order="3" shape="line" text="www.luxuo.com"><link url="www.luxuo.com"/></topic><topic id="4" position="200,0" order="0" shape="line" text=""/><topic id="5" position="200,100" order="4" fontStyle="Arial;12;#003333;bold;italic;" shape="line" text="forces"/><topic id="6" position="200,200" order="8" shape="line" text=""><note text="%5El%3A%5El%3A%5El%0A "/></topic><topic id="7" position="200,300" order="12" shape="line" text=""><topic id="8" position="290,275" order="0" fontStyle="Arial;12;#000066;bold;italic;" shape="line" text="externe"><topic id="9" position="380,250" order="0" fontStyle="Arial;12;#ff3300;bold;italic;" shape="line" text="opportunit?s"/><topic id="10" position="380,275" order="1" fontStyle="Arial;12;#333300;bold;italic;" shape="line" text="menaces"/></topic></topic></topic><relationship startArrow="false" endArrow="true" destCtrlPoint="108,0" srcCtrlPoint="108,0" lineType="3" destTopicId="6" srcTopicId="3" id="11"/><relationship startArrow="false" endArrow="true" destCtrlPoint="63,0" srcCtrlPoint="63,0" lineType="3" destTopicId="5" srcTopicId="7" id="12"/><relationship startArrow="false" endArrow="true" destCtrlPoint="211,0" srcCtrlPoint="211,0" lineType="3" destTopicId="0" srcTopicId="10" id="13"/></map>

View File

@@ -44,7 +44,7 @@ public class ExportTest {
// Export mile content ...
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
freemindExporter.export(mindmap, bos);
final String exportContent = new String(bos.toByteArray());
final String exportContent = new String(bos.toByteArray(),"UTF-8");
Assert.assertEquals(recContent.toString(), exportContent);
@@ -72,7 +72,7 @@ public class ExportTest {
fis.close();
final MindMap result = new MindMap();
result.setXml(content.toString().getBytes());
result.setXml(content.toString().getBytes("UTF-8"));
result.setNativeXml(content.toString());
return result;
}

View File

@@ -29,7 +29,7 @@ public class ImportExportTest {
@Test(dataProvider = "Data-Provider-Function")
public void exportImportExportTest(@NotNull final File freeMindFile, @NotNull final File wiseFile, @NotNull final File freeRecFile) throws ImporterException, IOException, ExportException {
public void exportImportTest(@NotNull final File freeMindFile, @NotNull final File wiseFile, @NotNull final File freeRecFile) throws ImporterException, IOException, ExportException {
final FileInputStream fileInputStream = new FileInputStream(freeMindFile.getAbsolutePath());
@@ -46,7 +46,7 @@ public class ImportExportTest {
} else {
final FileOutputStream fos = new FileOutputStream(wiseFile);
fos.write(mindMap.getUnzippedXml().getBytes());
fos.write(mindMap.getUnzippedXml().getBytes("UTF-8"));
fos.close();
}
@@ -55,12 +55,11 @@ public class ImportExportTest {
// Compare rec and file ...
final String recContent = readFile(freeRecFile);
// Export mile content ...
// Export content ...
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
exporter.export(mindMap, bos);
final String exportContent = new String(bos.toByteArray());
Assert.assertEquals(exportContent, recContent);
Assert.assertEquals(bos.toByteArray(), recContent.getBytes("UTF-8"));
} else {
final FileOutputStream fos = new FileOutputStream(freeRecFile);