aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-base/archiva-xml-tools/src
diff options
context:
space:
mode:
authorJoakim Erdfelt <joakime@apache.org>2007-04-26 15:12:49 +0000
committerJoakim Erdfelt <joakime@apache.org>2007-04-26 15:12:49 +0000
commitaea90f0eeaf55c024501437307f7dfe43840c8b1 (patch)
tree688a7d13ae85a3020e7264d52412b15c19066a33 /archiva-base/archiva-xml-tools/src
parent423f26e7564f3e2c0a28626311d53eb38fa2f6ff (diff)
downloadarchiva-aea90f0eeaf55c024501437307f7dfe43840c8b1.tar.gz
archiva-aea90f0eeaf55c024501437307f7dfe43840c8b1.zip
Making unit tests more resilient on windows.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@532776 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base/archiva-xml-tools/src')
-rw-r--r--archiva-base/archiva-xml-tools/src/test/java/org/apache/maven/archiva/xml/XMLWriterTest.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/archiva-base/archiva-xml-tools/src/test/java/org/apache/maven/archiva/xml/XMLWriterTest.java b/archiva-base/archiva-xml-tools/src/test/java/org/apache/maven/archiva/xml/XMLWriterTest.java
index a3d59d9b9..7841418a6 100644
--- a/archiva-base/archiva-xml-tools/src/test/java/org/apache/maven/archiva/xml/XMLWriterTest.java
+++ b/archiva-base/archiva-xml-tools/src/test/java/org/apache/maven/archiva/xml/XMLWriterTest.java
@@ -19,7 +19,6 @@ package org.apache.maven.archiva.xml;
* under the License.
*/
-import org.codehaus.plexus.util.FileUtils;
import org.dom4j.Document;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
@@ -38,7 +37,16 @@ public class XMLWriterTest
public void testWrite()
throws Exception
{
- String expectedResults = FileUtils.fileRead( getExampleXml( "prolog-with-utf8.xml" ) );
+ StringBuffer expected = new StringBuffer();
+
+ expected.append( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" );
+ expected.append( "\n" );
+ expected.append( "<basic>\n" );
+ expected.append( " <names>\n" );
+ expected.append( " <name>" ).append( TRYGVIS ).append( "</name>\n" );
+ expected.append( " <name>" ).append( INFINITE_ARCHIVA ).append( "</name>\n" );
+ expected.append( " </names>\n" );
+ expected.append( "</basic>\n" );
Element basic = DocumentHelper.createElement( "basic" );
Document doc = DocumentHelper.createDocument( basic );
@@ -50,6 +58,6 @@ public class XMLWriterTest
StringWriter actual = new StringWriter();
XMLWriter.write( doc, actual );
- assertEquals( "Comparision of contents:", expectedResults, actual.toString() );
+ assertEquals( "Comparision of contents:", expected.toString(), actual.toString() );
}
}