Skip to content
Permalink
Browse files
use XMLUnit to abstract the order of the XML elements
  • Loading branch information
hibnico committed Dec 27, 2014
1 parent 56c0430 commit 03542311e2a461f0324ec700e98e78b5540bcff8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
@@ -30,6 +30,7 @@
<classpathentry kind="lib" path="lib/commons-vfs.jar"/>
<classpathentry kind="lib" path="lib/jsch.jar"/>
<classpathentry kind="lib" path="lib/junit.jar"/>
<classpathentry kind="lib" path="lib/xmlunit.jar"/>
<classpathentry kind="lib" path="lib/oro.jar"/>
<classpathentry kind="lib" path="lib/bcpg-jdk14.jar"/>
<classpathentry kind="lib" path="lib/bcprov-jdk14.jar"/>
@@ -62,6 +62,7 @@
<dependency org="org.apache.ant" name="ant-testutil" rev="1.7.0" conf="test->default" transitive="false" />
<dependency org="ant" name="ant-launcher" rev="1.6.2" conf="test->default" transitive="false"/>
<dependency org="ant-contrib" name="ant-contrib" rev="1.0b3" conf="test->default" transitive="false"/>
<dependency org="xmlunit" name="xmlunit" rev="1.5" conf="test->default" transitive="false"/>

<!-- This dependency is necessary for having validation in junit tests when running with JDK1.4 -->
<dependency org="xerces" name="xercesImpl" rev="2.6.2" conf="test->default" />
@@ -25,8 +25,6 @@
import java.util.Date;
import java.util.GregorianCalendar;

import junit.framework.TestCase;

import org.apache.ivy.core.module.descriptor.Configuration;
import org.apache.ivy.core.module.descriptor.Configuration.Visibility;
import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
@@ -37,8 +35,9 @@
import org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser;
import org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParserTest;
import org.apache.ivy.util.FileUtil;
import org.custommonkey.xmlunit.XMLTestCase;

public class XmlModuleDescriptorWriterTest extends TestCase {
public class XmlModuleDescriptorWriterTest extends XMLTestCase {
private static String LICENSE;
static {
try {
@@ -155,7 +154,7 @@ public void testExtraInfosFromMaven() throws Exception {

String expected = readEntirely("test-write-extrainfo-from-maven.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
assertXMLEqual(expected, wrote);
}

public void testExtends() throws Exception {

0 comments on commit 0354231

Please sign in to comment.