use XMLUnit to abstract the order of the XML elements

This commit is contained in:
Nicolas Lalevée 2014-12-27 15:03:49 +01:00
parent 56c04300e8
commit 03542311e2
3 changed files with 5 additions and 4 deletions

View File

@ -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"/>

View File

@ -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" />

View File

@ -25,8 +25,6 @@ import java.io.InputStreamReader;
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.core.settings.IvySettings;
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 class XmlModuleDescriptorWriterTest extends TestCase {
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 {