You can subscribe to this list here.
2007 |
Jan
|
Feb
(3) |
Mar
(18) |
Apr
(39) |
May
(15) |
Jun
(12) |
Jul
(3) |
Aug
(23) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(21) |
Feb
(23) |
Mar
(33) |
Apr
(8) |
May
(1) |
Jun
(22) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(6) |
Nov
|
Dec
(11) |
2009 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(24) |
May
(36) |
Jun
(18) |
Jul
(2) |
Aug
(3) |
Sep
(9) |
Oct
(3) |
Nov
(1) |
Dec
|
2010 |
Jan
(5) |
Feb
(3) |
Mar
|
Apr
(15) |
May
(24) |
Jun
(11) |
Jul
(8) |
Aug
(34) |
Sep
(42) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
(13) |
Feb
(32) |
Mar
(35) |
Apr
(31) |
May
(33) |
Jun
(30) |
Jul
(32) |
Aug
(31) |
Sep
(30) |
Oct
(31) |
Nov
(32) |
Dec
(31) |
2012 |
Jan
(35) |
Feb
(31) |
Mar
(31) |
Apr
(30) |
May
(31) |
Jun
(34) |
Jul
(23) |
Aug
(30) |
Sep
(30) |
Oct
(29) |
Nov
(30) |
Dec
(32) |
2013 |
Jan
(25) |
Feb
(39) |
Mar
(1) |
Apr
(18) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(20) |
Sep
(41) |
Oct
(32) |
Nov
(9) |
Dec
(31) |
2014 |
Jan
(31) |
Feb
(30) |
Mar
(34) |
Apr
(60) |
May
(31) |
Jun
(28) |
Jul
(32) |
Aug
(28) |
Sep
(26) |
Oct
(32) |
Nov
(43) |
Dec
(115) |
2015 |
Jan
(106) |
Feb
(101) |
Mar
(51) |
Apr
(32) |
May
(63) |
Jun
(18) |
Jul
|
Aug
(18) |
Sep
|
Oct
(1) |
Nov
(84) |
Dec
(63) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(104) |
Apr
(30) |
May
(6) |
Jun
(30) |
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(48) |
Dec
(22) |
2017 |
Jan
(15) |
Feb
(29) |
Mar
(43) |
Apr
(29) |
May
(25) |
Jun
(28) |
Jul
(62) |
Aug
(35) |
Sep
(35) |
Oct
(72) |
Nov
(10) |
Dec
(4) |
2018 |
Jan
(7) |
Feb
(4) |
Mar
|
Apr
(46) |
May
(20) |
Jun
(12) |
Jul
(9) |
Aug
(42) |
Sep
(4) |
Oct
(17) |
Nov
(32) |
Dec
(31) |
2019 |
Jan
(21) |
Feb
(14) |
Mar
|
Apr
(74) |
May
(25) |
Jun
(43) |
Jul
(2) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
(10) |
2020 |
Jan
(1) |
Feb
|
Mar
(26) |
Apr
(8) |
May
(62) |
Jun
(4) |
Jul
(25) |
Aug
|
Sep
(21) |
Oct
(24) |
Nov
(26) |
Dec
(9) |
2021 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(11) |
Nov
(1) |
Dec
(12) |
2022 |
Jan
(47) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(14) |
2023 |
Jan
(3) |
Feb
|
Mar
(60) |
Apr
(9) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
(5) |
Feb
|
Mar
|
Apr
(10) |
May
(1) |
Jun
|
Jul
|
Aug
(17) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2025 |
Jan
|
Feb
|
Mar
(88) |
Apr
(64) |
May
(47) |
Jun
(20) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <bo...@us...> - 2013-04-25 16:22:28
|
Revision: 534 http://sourceforge.net/p/xmlunit/code/534 Author: bodewig Date: 2013-04-25 16:22:25 +0000 (Thu, 25 Apr 2013) Log Message: ----------- hamcrest matcher for schema validation by Robert Reimann Added Paths: ----------- trunk/xmlunit/src/main/java-hamcrest/net/sf/xmlunit/matcher/ trunk/xmlunit/src/main/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcher.java trunk/xmlunit/src/tests/java-hamcrest/net/sf/xmlunit/matcher/ trunk/xmlunit/src/tests/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcherTest.java Added: trunk/xmlunit/src/main/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcher.java =================================================================== --- trunk/xmlunit/src/main/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcher.java (rev 0) +++ trunk/xmlunit/src/main/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcher.java 2013-04-25 16:22:25 UTC (rev 534) @@ -0,0 +1,81 @@ +/* + This file is licensed to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +package net.sf.xmlunit.matcher; + +import net.sf.xmlunit.validation.JAXPValidator; +import net.sf.xmlunit.validation.Languages; +import net.sf.xmlunit.validation.ValidationProblem; +import net.sf.xmlunit.validation.ValidationResult; +import org.hamcrest.Description; +import org.hamcrest.Factory; +import org.hamcrest.TypeSafeMatcher; + +import javax.xml.transform.Source; +import java.util.Arrays; + +/** + * Hamcrest Matcher for XML Validation. + */ +public class ValidationMatcher extends TypeSafeMatcher<Source> { + + private final Source schemaSource[]; + private Source instance; + private ValidationResult result; + + public ValidationMatcher(Source... schemaSource) { + this.schemaSource = schemaSource; + } + + @Override + public boolean matchesSafely(Source instance) { + this.instance = instance; + JAXPValidator v = new JAXPValidator(Languages.W3C_XML_SCHEMA_NS_URI); + if (schemaSource.length <= 1) { + v.setSchemaSource(schemaSource[0]); + } else { + v.setSchemaSources(schemaSource); + } + this.result = v.validateInstance(instance); + return this.result.isValid(); + } + + @Override + public void describeTo(Description description) { + description.appendText(" that ") + .appendValue(instance.getSystemId()) + .appendText(" validates against "); + for (Source schema : Arrays.asList(schemaSource)) { + description.appendValue(schema.getSystemId()); + } + } + + @Override + protected void describeMismatchSafely(final Source instance, final Description mismatchDescription) { + if (this.result != null && this.result.getProblems() != null) { + mismatchDescription.appendText(" got validation errors: "); + for (ValidationProblem problem : this.result.getProblems()) { + mismatchDescription.appendText(problem.toString()); + } + } else { + mismatchDescription.appendText(" got unexpected error!"); + } + } + + @Factory + public static ValidationMatcher valid(final Source schemaSource) { + return new ValidationMatcher(schemaSource); + } + + +} Property changes on: trunk/xmlunit/src/main/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcher.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/xmlunit/src/tests/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcherTest.java =================================================================== --- trunk/xmlunit/src/tests/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcherTest.java (rev 0) +++ trunk/xmlunit/src/tests/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcherTest.java 2013-04-25 16:22:25 UTC (rev 534) @@ -0,0 +1,43 @@ +/* + This file is licensed to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +package net.sf.xmlunit.matcher; + +import org.junit.Test; + +import javax.xml.transform.stream.StreamSource; +import java.io.File; + +import static net.sf.xmlunit.matcher.ValidationMatcher.valid; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.junit.Assert.assertThat; + +/** + * Tests for ValidationMatcher. + */ +public class ValidationMatcherTest { + + @Test + public void shouldSuccessfullyValidateInstance() { + assertThat(new StreamSource(new File("src/tests/resources/BookXsdGenerated.xml")), + is(valid(new StreamSource(new File("src/tests/resources/Book.xsd"))))); + + } + + @Test + public void shouldFailOnBrokenInstance() { + assertThat(new StreamSource(new File("src/tests/resources/invalidBook.xml")), + is(not(valid(new StreamSource(new File("src/tests/resources/Book.xsd")))))); + } +} Property changes on: trunk/xmlunit/src/tests/java-hamcrest/net/sf/xmlunit/matcher/ValidationMatcherTest.java ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-25 15:40:16
|
Revision: 533 http://sourceforge.net/p/xmlunit/code/533 Author: bodewig Date: 2013-04-25 15:40:13 +0000 (Thu, 25 Apr 2013) Log Message: ----------- Upgrade to JUnit 4.11 Modified Paths: -------------- trunk/xmlunit/build.xml Added Paths: ----------- trunk/xmlunit/lib/hamcrest-core-1.3.jar trunk/xmlunit/lib/junit-4.11.jar Removed Paths: ------------- trunk/xmlunit/lib/junit-4.10.jar Modified: trunk/xmlunit/build.xml =================================================================== --- trunk/xmlunit/build.xml 2013-04-25 15:14:36 UTC (rev 532) +++ trunk/xmlunit/build.xml 2013-04-25 15:40:13 UTC (rev 533) @@ -135,6 +135,7 @@ <pathelement location="${core.out.dir}"/> <pathelement path="${java.class.path}"/> <fileset dir="lib" includes="junit-4*.jar"/> + <fileset dir="lib" includes="hamcrest-core-*.jar"/> </classpath> </javac> </target> @@ -147,7 +148,7 @@ <classpath> <pathelement location="${core.out.dir}"/> <pathelement path="${java.class.path}"/> - <fileset dir="lib" includes="junit-4*.jar"/> + <fileset dir="lib" includes="hamcrest-core-*.jar"/> </classpath> </javac> </target> @@ -162,6 +163,7 @@ <pathelement location="${hamcrest.out.dir}"/> <pathelement path="${java.class.path}"/> <fileset dir="lib" includes="junit-4*.jar"/> + <fileset dir="lib" includes="hamcrest-core-*.jar"/> </classpath> </javac> </target> @@ -184,6 +186,7 @@ <pathelement location="${hamcresttest.out.dir}"/> <pathelement path="${java.class.path}"/> <fileset dir="lib" includes="junit-4*.jar"/> + <fileset dir="lib" includes="hamcrest-core-*.jar"/> </classpath> <formatter type="xml"/> <batchtest todir="${test.report.dir}"> Added: trunk/xmlunit/lib/hamcrest-core-1.3.jar =================================================================== (Binary files differ) Index: trunk/xmlunit/lib/hamcrest-core-1.3.jar =================================================================== --- trunk/xmlunit/lib/hamcrest-core-1.3.jar 2013-04-25 15:14:36 UTC (rev 532) +++ trunk/xmlunit/lib/hamcrest-core-1.3.jar 2013-04-25 15:40:13 UTC (rev 533) Property changes on: trunk/xmlunit/lib/hamcrest-core-1.3.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Deleted: trunk/xmlunit/lib/junit-4.10.jar =================================================================== (Binary files differ) Added: trunk/xmlunit/lib/junit-4.11.jar =================================================================== (Binary files differ) Index: trunk/xmlunit/lib/junit-4.11.jar =================================================================== --- trunk/xmlunit/lib/junit-4.11.jar 2013-04-25 15:14:36 UTC (rev 532) +++ trunk/xmlunit/lib/junit-4.11.jar 2013-04-25 15:40:13 UTC (rev 533) Property changes on: trunk/xmlunit/lib/junit-4.11.jar ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-25 15:15:02
|
Revision: 532 http://sourceforge.net/p/xmlunit/code/532 Author: bodewig Date: 2013-04-25 15:14:36 +0000 (Thu, 25 Apr 2013) Log Message: ----------- infrastructure for NUnit Constraints Modified Paths: -------------- trunk/xmlunit/xmlunit.nant.build Added Paths: ----------- trunk/xmlunit/src/main/net-constraints/ trunk/xmlunit/src/tests/net-constraints/ Modified: trunk/xmlunit/xmlunit.nant.build =================================================================== --- trunk/xmlunit/xmlunit.nant.build 2013-04-25 14:10:50 UTC (rev 531) +++ trunk/xmlunit/xmlunit.nant.build 2013-04-25 15:14:36 UTC (rev 532) @@ -21,10 +21,17 @@ <property name="core.src.dir" value="${base.dir}/src/main/net-core" overwrite="false"/> <property name="core.tests.src.dir" value="${base.dir}/src/tests/net-core" overwrite="false"/> + <property name="constraints.src.dir" value="${base.dir}/src/main/net-constraints" overwrite="false"/> + <property name="constraints.tests.src.dir" value="${base.dir}/src/tests/net-constraints" + overwrite="false"/> <property name="build.dir" value="${base.dir}/build/net" overwrite="false"/> <property name="gen.src.dir" value="${build.dir}/generated" overwrite="false"/> + <property name="gen.core.dir" value="${gen.src.dir}/core" + overwrite="false"/> + <property name="gen.constraints.dir" value="${gen.src.dir}/constraints" + overwrite="false"/> <property name="test.report.dir" value="${build.dir}/test-report"/> <property name="bin.dir" value="${build.dir}/bin" overwrite="false"/> @@ -39,7 +46,8 @@ value="lib" /> <target name="init" description="prepare for other targets"> - <mkdir dir="${gen.src.dir}"/> + <mkdir dir="${gen.core.dir}"/> + <mkdir dir="${gen.constraints.dir}"/> <mkdir dir="${bin.dir}"/> <copy file="${nunit.v2.bin.dir}/${nunit.v2.assembly}" tofile="${bin.dir}/${nunit.v2.assembly}"/> @@ -51,7 +59,7 @@ <target name="compile-core" description="compile core source files" depends="init"> - <asminfo output="${gen.src.dir}/AssemblyInfo.cs" language="CSharp"> + <asminfo output="${gen.core.dir}/AssemblyInfo.cs" language="CSharp"> <imports> <import namespace="System" /> <import namespace="System.Reflection" /> @@ -69,21 +77,56 @@ value="${project::get-name()}-core.tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100fdec9d5858956ff10ff9cf39935441a7d4a216475a467e951ddd8fcce0b74443696680a6cfb58f8b1d96166acb76f9eae0431a223cecb30e224c21f30e57c457747f6ba176e6c22f48e105b200b458509b6de815cccdfc9ebe59ae4024c4b8659d2f2fcb65b1688f8327b10c96ed7e5f536ba6a1978ae86aca438439efbd6cb6"/> </attributes> </asminfo> - <copy todir="${gen.src.dir}"> + <copy todir="${gen.core.dir}"> <fileset basedir="${core.src.dir}"> <include name="**/*.cs"/> </fileset> </copy> <csc target="library" output="${bin.dir}/${project::get-name()}-core.dll" debug="true" verbose="${csc.verbose}" keyfile="xmlunit.snk"> - <sources basedir="${gen.src.dir}"> + <sources basedir="${gen.core.dir}"> <include name="**/*.cs"/> </sources> </csc> </target> + <target name="compile-constraints" depends="compile-core" + description="compile constraints source files"> + <asminfo output="${gen.constraints.dir}/AssemblyInfo.cs" language="CSharp"> + <imports> + <import namespace="System" /> + <import namespace="System.Reflection" /> + <import namespace="System.Runtime.InteropServices" /> + <import namespace="System.Runtime.CompilerServices" /> + </imports> + <attributes> + <attribute type="ComVisibleAttribute" value="false"/> + <attribute type="CLSCompliantAttribute" value="true"/> + <attribute type="AssemblyVersionAttribute" value="${project.version4}"/> + <attribute type="AssemblyTitleAttribute" value="XMLUnit Constraints for NUnit" /> + <attribute type="AssemblyDescriptionAttribute" + value="Constraints Classes of XMLUnit for .NET" /> + <attribute type="InternalsVisibleToAttribute" + value="${project::get-name()}-constraints.tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100fdec9d5858956ff10ff9cf39935441a7d4a216475a467e951ddd8fcce0b74443696680a6cfb58f8b1d96166acb76f9eae0431a223cecb30e224c21f30e57c457747f6ba176e6c22f48e105b200b458509b6de815cccdfc9ebe59ae4024c4b8659d2f2fcb65b1688f8327b10c96ed7e5f536ba6a1978ae86aca438439efbd6cb6"/> + </attributes> + </asminfo> + <copy todir="${gen.constraints.dir}"> + <fileset basedir="${constraints.src.dir}"> + <include name="**/*.cs"/> + </fileset> + </copy> + <csc target="library" output="${bin.dir}/${project::get-name()}-constraints.dll" + debug="true" verbose="${csc.verbose}" keyfile="xmlunit.snk"> + <sources basedir="${gen.constraints.dir}"> + <include name="**/*.cs"/> + </sources> + </csc> + </target> + <target name="compile" description="compile all source files" - depends="compile-core"> + depends="compile-core,compile-constraints"/> + + <target name="compile-core-tests" depends="compile"> <csc target="library" output="${bin.dir}/${project::get-name()}-core.tests.dll" debug="true" verbose="${csc.verbose}" keyfile="xmlunit.snk"> @@ -97,11 +140,30 @@ </csc> </target> - <target name="test" description="run all tests" depends="compile"> + <target name="compile-constraints-tests" depends="compile-constraints"> + <!--csc target="library" + output="${bin.dir}/${project::get-name()}-constraints.tests.dll" + debug="true" verbose="${csc.verbose}" keyfile="xmlunit.snk"> + <references basedir="${bin.dir}"> + <include name="${project::get-name()}-core.dll"/> + <include name="${project::get-name()}-constraints.dll"/> + <include name="${nunit.v2.assembly}"/> + </references> + <sources basedir="${constraints.tests.src.dir}"> + <include name="**/*.cs"/> + </sources> + </csc--> + </target> + + <target name="compile-tests" + depends="compile-core-tests,compile-constraints-tests"/> + + <target name="test" description="run all tests" depends="compile-tests"> <nunit2> <formatter type="Plain"/> <formatter type="Xml" usefile="true" outputdir="${test.report.dir}"/> <test assemblyname="${bin.dir}/${project::get-name()}-core.tests.dll"/> + <!--test assemblyname="${bin.dir}/${project::get-name()}-constraints.tests.dll"/--> </nunit2> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-25 14:11:09
|
Revision: 531 http://sourceforge.net/p/xmlunit/code/531 Author: bodewig Date: 2013-04-25 14:10:50 +0000 (Thu, 25 Apr 2013) Log Message: ----------- Infrastructure for a jar of hamcrest matchers Modified Paths: -------------- trunk/xmlunit/build.xml Added Paths: ----------- trunk/xmlunit/src/main/java-hamcrest/ trunk/xmlunit/src/main/java-hamcrest/net/ trunk/xmlunit/src/main/java-hamcrest/net/sf/ trunk/xmlunit/src/main/java-hamcrest/net/sf/xmlunit/ trunk/xmlunit/src/tests/java-hamcrest/ trunk/xmlunit/src/tests/java-hamcrest/net/ trunk/xmlunit/src/tests/java-hamcrest/net/sf/ trunk/xmlunit/src/tests/java-hamcrest/net/sf/xmlunit/ Modified: trunk/xmlunit/build.xml =================================================================== --- trunk/xmlunit/build.xml 2013-04-14 18:52:18 UTC (rev 530) +++ trunk/xmlunit/build.xml 2013-04-25 14:10:50 UTC (rev 531) @@ -28,8 +28,10 @@ <property name="lib.dir" value="${build.dir}/lib"/> <property name="core.out.dir" value="${build.dir}/core-classes"/> <property name="legacy.out.dir" value="${build.dir}/legacy-classes"/> + <property name="hamcrest.out.dir" value="${build.dir}/hamcrest-classes"/> <property name="coretest.out.dir" value="${build.dir}/core-test-classes"/> <property name="legacytest.out.dir" value="${build.dir}/legacy-test-classes"/> + <property name="hamcresttest.out.dir" value="${build.dir}/hamcrest-test-classes"/> <property name="userguide.out.dir" value="${build.dir}/ug-classes"/> <property name="test.report.dir" value="${build.dir}/test-report"/> <property name="dist.dir" value="${build.dir}/dist"/> @@ -55,8 +57,10 @@ <mkdir dir="${lib.dir}"/> <mkdir dir="${core.out.dir}"/> <mkdir dir="${legacy.out.dir}"/> + <mkdir dir="${hamcrest.out.dir}"/> <mkdir dir="${coretest.out.dir}"/> <mkdir dir="${legacytest.out.dir}"/> + <mkdir dir="${hamcresttest.out.dir}"/> <mkdir dir="${test.report.dir}"/> <mkdir dir="${dist.dir}"/> <mkdir dir="${docs.dir}"/> @@ -70,8 +74,10 @@ <fileset dir="${lib.dir}"/> <fileset dir="${core.out.dir}"/> <fileset dir="${legacy.out.dir}"/> + <fileset dir="${hamcrest.out.dir}"/> <fileset dir="${coretest.out.dir}"/> <fileset dir="${legacytest.out.dir}"/> + <fileset dir="${hamcresttest.out.dir}"/> <fileset dir="${test.report.dir}"/> <fileset dir="${dist.dir}"/> <fileset dir="${docs.dir}"/> @@ -133,9 +139,36 @@ </javac> </target> - <target name="compile" depends="compile-core,compile-legacy"/> + <target name="compile-hamcrest" depends="compile-core" + description="compiles hamcrest matchers"> + <javac srcdir="${src.dir}/java-hamcrest" destdir="${hamcrest.out.dir}" + includeantruntime="false" debug="${javac.debug}" + target="${javac.target}" source="${javac.source}"> + <classpath> + <pathelement location="${core.out.dir}"/> + <pathelement path="${java.class.path}"/> + <fileset dir="lib" includes="junit-4*.jar"/> + </classpath> + </javac> + </target> + + <target name="compile-hamcrest-tests" depends="compile-hamcrest" + description="Compiles the tests for hamcrest matchers"> + <javac srcdir="${test.dir}/java-hamcrest" destdir="${hamcresttest.out.dir}" + includeantruntime="false" debug="${javac.debug}" + target="${javac.target}" source="${javac.source}"> + <classpath> + <pathelement location="${core.out.dir}"/> + <pathelement location="${hamcrest.out.dir}"/> + <pathelement path="${java.class.path}"/> + <fileset dir="lib" includes="junit-4*.jar"/> + </classpath> + </javac> + </target> + + <target name="compile" depends="compile-core,compile-legacy,compile-hamcrest"/> <target name="compile-tests" - depends="compile-core-tests,compile-legacy-tests"/> + depends="compile-core-tests,compile-legacy-tests,compile-hamcrest-tests"/> <target name="test" depends="compile-tests" description="runs the tests"> <junit printsummary="yes" haltonfailure="no" fork="${junit.fork}" @@ -145,8 +178,10 @@ <classpath> <pathelement location="${core.out.dir}"/> <pathelement location="${legacy.out.dir}"/> + <pathelement location="${hamcrest.out.dir}"/> <pathelement location="${legacytest.out.dir}"/> <pathelement location="${coretest.out.dir}"/> + <pathelement location="${hamcresttest.out.dir}"/> <pathelement path="${java.class.path}"/> <fileset dir="lib" includes="junit-4*.jar"/> </classpath> @@ -159,6 +194,9 @@ <include name="**/*Test.java"/> <exclude name="**/Abstract*.java"/> </fileset> + <fileset dir="${test.dir}/java-hamcrest"> + <include name="**/*Test.java"/> + </fileset> </batchtest> </junit> @@ -214,9 +252,13 @@ <jar jarfile="${lib.dir}/xmlunit-legacy-${xmlunit.version}.jar" basedir="${legacy.out.dir}" /> + <jar jarfile="${lib.dir}/xmlunit-hamcrest-${xmlunit.version}.jar" + basedir="${hamcrest.out.dir}" + /> <jar jarfile="${lib.dir}/xmlunit-sumo-${xmlunit.version}.jar"> <fileset dir="${core.out.dir}"/> <fileset dir="${legacy.out.dir}"/> + <fileset dir="${hamcrest.out.dir}"/> </jar> <tstamp> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-14 18:52:22
|
Revision: 530 http://sourceforge.net/p/xmlunit/code/530 Author: bodewig Date: 2013-04-14 18:52:18 +0000 (Sun, 14 Apr 2013) Log Message: ----------- replace in XPath was only needed because the very first level has a path of / - avoid it Modified Paths: -------------- trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java trunk/xmlunit/src/main/net-core/diff/XPathContext.cs Modified: trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java =================================================================== --- trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java 2013-04-14 18:30:29 UTC (rev 529) +++ trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java 2013-04-14 18:52:18 UTC (rev 530) @@ -135,17 +135,20 @@ } public String getXPath() { - String xpath = getXPath(path.descendingIterator()); - return xpath.replace(SEP + SEP, SEP); + return getXPath(path.descendingIterator()); } private String getXPath(Iterator<Level> dIterator) { if (!dIterator.hasNext()) { - return ""; + return EMPTY; } Level l = dIterator.next(); if (null == l.xpath) { - l.xpath = getXPath(dIterator) + SEP + l.expression; + String previous = getXPath(dIterator); + if (!SEP.equals(previous)) { + previous += SEP; + } + l.xpath = previous + l.expression; } return l.xpath; } Modified: trunk/xmlunit/src/main/net-core/diff/XPathContext.cs =================================================================== --- trunk/xmlunit/src/main/net-core/diff/XPathContext.cs 2013-04-14 18:30:29 UTC (rev 529) +++ trunk/xmlunit/src/main/net-core/diff/XPathContext.cs 2013-04-14 18:52:18 UTC (rev 530) @@ -40,7 +40,7 @@ } else { this.uri2Prefix = new Dictionary<string, string>(uri2Prefix); } - path.AddLast(new Level("")); + path.AddLast(new Level(string.Empty)); } public void NavigateToChild(int index) { @@ -128,8 +128,7 @@ public string XPath { get { - String xpath = GetXPath(path.Last); - return xpath.Replace(SEP + SEP, SEP); + return GetXPath(path.Last); } } @@ -139,8 +138,11 @@ } Level level = l.Value; if (null == level.XPath) { - level.XPath = GetXPath(l.Previous) - + SEP + level.Expression; + string previous = GetXPath(l.Previous); + if (previous != SEP) { + previous += SEP; + } + level.XPath = previous + level.Expression; } return level.XPath; } @@ -151,7 +153,7 @@ if (ns != null) { uri2Prefix.TryGetValue(ns, out p); } - return (p == null ? "" : p + ":") + name.Name; + return (p == null ? string.Empty : p + ":") + name.Name; } /// <summary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-14 18:30:32
|
Revision: 529 http://sourceforge.net/p/xmlunit/code/529 Author: bodewig Date: 2013-04-14 18:30:29 +0000 (Sun, 14 Apr 2013) Log Message: ----------- cosmetic changes Modified Paths: -------------- trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java trunk/xmlunit/src/main/net-core/diff/XPathContext.cs Modified: trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java =================================================================== --- trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java 2013-04-14 18:21:34 UTC (rev 528) +++ trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java 2013-04-14 18:30:29 UTC (rev 529) @@ -139,7 +139,7 @@ return xpath.replace(SEP + SEP, SEP); } - public String getXPath(Iterator<Level> dIterator) { + private String getXPath(Iterator<Level> dIterator) { if (!dIterator.hasNext()) { return ""; } Modified: trunk/xmlunit/src/main/net-core/diff/XPathContext.cs =================================================================== --- trunk/xmlunit/src/main/net-core/diff/XPathContext.cs 2013-04-14 18:21:34 UTC (rev 528) +++ trunk/xmlunit/src/main/net-core/diff/XPathContext.cs 2013-04-14 18:30:29 UTC (rev 529) @@ -128,18 +128,18 @@ public string XPath { get { - String xpath = EnsureXPathsAreSetOnLevels(path.Last); + String xpath = GetXPath(path.Last); return xpath.Replace(SEP + SEP, SEP); } } - private static String EnsureXPathsAreSetOnLevels(LinkedListNode<Level> l) { + private static string GetXPath(LinkedListNode<Level> l) { if (l == null) { return string.Empty; } Level level = l.Value; if (null == level.XPath) { - level.XPath = EnsureXPathsAreSetOnLevels(l.Previous) + level.XPath = GetXPath(l.Previous) + SEP + level.Expression; } return level.XPath; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-14 18:21:38
|
Revision: 528 http://sourceforge.net/p/xmlunit/code/528 Author: bodewig Date: 2013-04-14 18:21:34 +0000 (Sun, 14 Apr 2013) Log Message: ----------- caching of (partial) XPaths to speed up comparisions, submitted by David Rees - fixes #61 Modified Paths: -------------- trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java trunk/xmlunit/src/main/net-core/diff/XPathContext.cs Modified: trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java =================================================================== --- trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java 2013-04-14 16:29:49 UTC (rev 527) +++ trunk/xmlunit/src/main/java-core/net/sf/xmlunit/diff/XPathContext.java 2013-04-14 18:21:34 UTC (rev 528) @@ -16,11 +16,15 @@ import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; + import javax.xml.namespace.QName; + import net.sf.xmlunit.util.Nodes; + import org.w3c.dom.Node; public class XPathContext { @@ -131,13 +135,22 @@ } public String getXPath() { - StringBuilder sb = new StringBuilder(); - for (Level l : path) { - sb.append(SEP).append(l.expression); + String xpath = getXPath(path.descendingIterator()); + return xpath.replace(SEP + SEP, SEP); + } + + public String getXPath(Iterator<Level> dIterator) { + if (!dIterator.hasNext()) { + return ""; } - return sb.toString().replace(SEP + SEP, SEP); + Level l = dIterator.next(); + if (null == l.xpath) { + l.xpath = getXPath(dIterator) + SEP + l.expression; + } + return l.xpath; } + private String getName(QName name) { String ns = name.getNamespaceURI(); String p = null; @@ -164,6 +177,7 @@ private final String expression; private List<Level> children = new ArrayList<Level>(); private Map<QName, Level> attributes = new HashMap<QName, Level>(); + private String xpath; private Level(String expression) { this.expression = expression; } Modified: trunk/xmlunit/src/main/net-core/diff/XPathContext.cs =================================================================== --- trunk/xmlunit/src/main/net-core/diff/XPathContext.cs 2013-04-14 16:29:49 UTC (rev 527) +++ trunk/xmlunit/src/main/net-core/diff/XPathContext.cs 2013-04-14 18:21:34 UTC (rev 528) @@ -128,14 +128,23 @@ public string XPath { get { - StringBuilder sb = new StringBuilder(); - foreach (Level l in path) { - sb.AppendFormat(SEP + "{0}", l.Expression); - } - return sb.Replace(SEP + SEP, SEP).ToString(); + String xpath = EnsureXPathsAreSetOnLevels(path.Last); + return xpath.Replace(SEP + SEP, SEP); } } + private static String EnsureXPathsAreSetOnLevels(LinkedListNode<Level> l) { + if (l == null) { + return string.Empty; + } + Level level = l.Value; + if (null == level.XPath) { + level.XPath = EnsureXPathsAreSetOnLevels(l.Previous) + + SEP + level.Expression; + } + return level.XPath; + } + private string GetName(XmlQualifiedName name) { string ns = name.Namespace; string p = null; @@ -159,10 +168,15 @@ } internal class Level { + private string xpath; internal readonly string Expression; internal readonly IList<Level> Children = new List<Level>(); internal readonly IDictionary<XmlQualifiedName, Level> Attributes = new Dictionary<XmlQualifiedName, Level>(); + internal string XPath { + get { return xpath; } + set { xpath = value; } + } internal Level(string expression) { this.Expression = expression; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-14 16:29:52
|
Revision: 527 http://sourceforge.net/p/xmlunit/code/527 Author: bodewig Date: 2013-04-14 16:29:49 +0000 (Sun, 14 Apr 2013) Log Message: ----------- Port fix for Issue 60 by Eric Siegerman to 2.x branch Modified Paths: -------------- trunk/xmlunit/src/main/java-legacy/org/custommonkey/xmlunit/DifferenceEngine.java trunk/xmlunit/src/main/java-legacy/org/custommonkey/xmlunit/NewDifferenceEngine.java trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_DetailedDiff.java trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_Diff.java trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_DifferenceEngine.java trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_NewDifferenceEngine.java trunk/xmlunit/src/user-guide/XMLUnit-Java.xml Modified: trunk/xmlunit/src/main/java-legacy/org/custommonkey/xmlunit/DifferenceEngine.java =================================================================== --- trunk/xmlunit/src/main/java-legacy/org/custommonkey/xmlunit/DifferenceEngine.java 2013-04-14 15:59:58 UTC (rev 526) +++ trunk/xmlunit/src/main/java-legacy/org/custommonkey/xmlunit/DifferenceEngine.java 2013-04-14 16:29:49 UTC (rev 527) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2010, Jeff Martin, Tim Bacon +Copyright (c) 2001-2010,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -322,16 +322,28 @@ protected void compareNodeChildren(Node control, Node test, DifferenceListener listener, ElementQualifier elementQualifier) throws DifferenceFoundException { - if (control.hasChildNodes() && test.hasChildNodes()) { - List controlChildren = nodeList2List(control.getChildNodes()); - List testChildren = nodeList2List(test.getChildNodes()); - Integer controlLength = new Integer(controlChildren.size()); - Integer testLength = new Integer(testChildren.size()); - compare(controlLength, testLength, control, test, listener, - CHILD_NODELIST_LENGTH); - compareNodeList(controlChildren, testChildren, - controlLength.intValue(), listener, elementQualifier); + List controlChildren = nodeList2List(control.getChildNodes()); + List testChildren = nodeList2List(test.getChildNodes()); + + Integer controlLength = new Integer(controlChildren.size()); + Integer testLength = new Integer(testChildren.size()); + compare(controlLength, testLength, control, test, listener, + CHILD_NODELIST_LENGTH); + + if (control.hasChildNodes() || test.hasChildNodes()) { + if (!control.hasChildNodes()) { + for (Iterator iter = testChildren.iterator(); iter.hasNext();) { + missingNode(null, (Node) iter.next(), listener); + } + } else if (!test.hasChildNodes()) { + for (Iterator iter = controlChildren.iterator(); iter.hasNext();) { + missingNode((Node) iter.next(), null, listener); + } + } else { + compareNodeList(controlChildren, testChildren, + controlLength.intValue(), listener, elementQualifier); + } } } Modified: trunk/xmlunit/src/main/java-legacy/org/custommonkey/xmlunit/NewDifferenceEngine.java =================================================================== --- trunk/xmlunit/src/main/java-legacy/org/custommonkey/xmlunit/NewDifferenceEngine.java 2013-04-14 15:59:58 UTC (rev 526) +++ trunk/xmlunit/src/main/java-legacy/org/custommonkey/xmlunit/NewDifferenceEngine.java 2013-04-14 16:29:49 UTC (rev 527) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2010, Jeff Martin, Tim Bacon +Copyright (c) 2001-2010,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -40,6 +40,7 @@ import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; +import java.util.List; import java.util.Map; import javax.xml.namespace.QName; import javax.xml.transform.Source; @@ -213,7 +214,8 @@ engine.compare(ctrlSource, tstSource); } - public static Difference toDifference(Comparison comp) { + public static Iterable<Difference> toDifference(Comparison comp) { + List<Difference> diffs = new LinkedList<Difference>(); Difference proto = null; switch (comp.getType()) { case ATTR_VALUE_EXPLICITLY_SPECIFIED: @@ -276,19 +278,19 @@ Comparison.Detail td = comp.getTestDetails(); if (ZERO.equals(cd.getValue()) || ZERO.equals(td.getValue())) { - return new Difference(HAS_CHILD_NODES, - new NodeDetail(String - .valueOf(!ZERO - .equals(cd - .getValue())), - (Node) cd.getTarget(), - cd.getXPath()), - new NodeDetail(String - .valueOf(!ZERO - .equals(td - .getValue())), - (Node) td.getTarget(), - td.getXPath())); + diffs.add(new Difference(HAS_CHILD_NODES, + new NodeDetail(String + .valueOf(!ZERO + .equals(cd + .getValue())), + (Node) cd.getTarget(), + cd.getXPath()), + new NodeDetail(String + .valueOf(!ZERO + .equals(td + .getValue())), + (Node) td.getTarget(), + td.getXPath()))); } proto = CHILD_NODELIST_LENGTH; break; @@ -306,10 +308,10 @@ break; } if (proto != null) { - return new Difference(proto, toNodeDetail(comp.getControlDetails()), - toNodeDetail(comp.getTestDetails())); + diffs.add(new Difference(proto, toNodeDetail(comp.getControlDetails()), + toNodeDetail(comp.getTestDetails()))); } - return null; + return diffs; } public static NodeDetail toNodeDetail(Comparison.Detail detail) { @@ -333,8 +335,7 @@ public void comparisonPerformed(Comparison comparison, ComparisonResult outcome) { - Difference diff = toDifference(comparison); - if (diff != null) { + for (Difference diff : toDifference(comparison)) { mt.matchFound(diff); } } @@ -350,8 +351,7 @@ public void comparisonPerformed(Comparison comparison, ComparisonResult outcome) { - Difference diff = toDifference(comparison); - if (diff != null) { + for (Difference diff : toDifference(comparison)) { dl.differenceFound(diff); } } @@ -412,9 +412,10 @@ public ComparisonResult evaluate(Comparison comparison, ComparisonResult outcome) { - Difference diff = toDifference(comparison); - if (diff != null && cc.haltComparison(diff)) { - return ComparisonResult.CRITICAL; + for (Difference diff : toDifference(comparison)) { + if (cc.haltComparison(diff)) { + return ComparisonResult.CRITICAL; + } } return outcome; } @@ -445,21 +446,31 @@ public ComparisonResult evaluate(Comparison comparison, ComparisonResult outcome) { - Difference diff = toDifference(comparison); - if (diff != null) { + ComparisonResult max = outcome; + for (Difference diff : toDifference(comparison)) { + ComparisonResult curr = null; switch (dl.differenceFound(diff)) { case DifferenceListener .RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL: - return ComparisonResult.EQUAL; + curr = ComparisonResult.EQUAL; + break; case DifferenceListener .RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR: - return ComparisonResult.SIMILAR; + curr = ComparisonResult.SIMILAR; + break; case DifferenceListener .RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT: - return ComparisonResult.DIFFERENT; + curr = ComparisonResult.DIFFERENT; + break; + default: + // unknown result, ignore it + break; } + if (curr != null && curr.compareTo(max) > 0) { + max = curr; + } } - return outcome; + return max; } } Modified: trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_DetailedDiff.java =================================================================== --- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_DetailedDiff.java 2013-04-14 15:59:58 UTC (rev 526) +++ trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_DetailedDiff.java 2013-04-14 16:29:49 UTC (rev 527) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2008,2010 Jeff Martin, Tim Bacon +Copyright (c) 2001-2008,2010,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -63,17 +63,19 @@ private void assertExpectedDifferencesFirstForecastControl(List differences, DetailedDiff detailedDiff) { - assertEquals("size: " + detailedDiff, 5, differences.size()); + assertEquals("size: " + detailedDiff, 6, differences.size()); assertEquals("first: " + detailedDiff, DifferenceConstants.HAS_CHILD_NODES, differences.get(0)); assertEquals("second: " + detailedDiff, - DifferenceConstants.ELEMENT_NUM_ATTRIBUTES, differences.get(1)); + DifferenceConstants.CHILD_NODELIST_LENGTH, differences.get(1)); assertEquals("third: " + detailedDiff, - DifferenceConstants.ATTR_NAME_NOT_FOUND, differences.get(2)); - assertEquals("fourth: " + detailedDiff, - DifferenceConstants.ATTR_VALUE, differences.get(3)); + DifferenceConstants.ELEMENT_NUM_ATTRIBUTES, differences.get(2)); + assertEquals("forth: " + detailedDiff, + DifferenceConstants.ATTR_NAME_NOT_FOUND, differences.get(3)); assertEquals("fifth: " + detailedDiff, - DifferenceConstants.CHILD_NODE_NOT_FOUND, differences.get(4)); + DifferenceConstants.ATTR_VALUE, differences.get(4)); + assertEquals("sixth: " + detailedDiff, + DifferenceConstants.CHILD_NODE_NOT_FOUND, differences.get(5)); } public void testAllDifferencesSecondForecastControl() throws Exception { @@ -82,18 +84,20 @@ List differences = detailedDiff.getAllDifferences(); - assertEquals("size: " + detailedDiff, 5, differences.size()); + assertEquals("size: " + detailedDiff, 6, differences.size()); assertEquals("first: " + detailedDiff, DifferenceConstants.HAS_CHILD_NODES, differences.get(0)); assertEquals("second: " + detailedDiff, - DifferenceConstants.ELEMENT_NUM_ATTRIBUTES, differences.get(1)); + DifferenceConstants.CHILD_NODELIST_LENGTH, differences.get(1)); assertEquals("third: " + detailedDiff, - DifferenceConstants.ATTR_VALUE, differences.get(2)); + DifferenceConstants.ELEMENT_NUM_ATTRIBUTES, differences.get(2)); assertEquals("forth: " + detailedDiff, + DifferenceConstants.ATTR_VALUE, differences.get(3)); + assertEquals("fifth: " + detailedDiff, DifferenceConstants.ATTR_NAME_NOT_FOUND, - differences.get(3)); - assertEquals("fifth: " + detailedDiff, - DifferenceConstants.CHILD_NODE_NOT_FOUND, differences.get(4)); + differences.get(4)); + assertEquals("sixth: " + detailedDiff, + DifferenceConstants.CHILD_NODE_NOT_FOUND, differences.get(5)); } public void testPrototypeIsADetailedDiff() throws Exception { Modified: trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_Diff.java =================================================================== --- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_Diff.java 2013-04-14 15:59:58 UTC (rev 526) +++ trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_Diff.java 2013-04-14 16:29:49 UTC (rev 527) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2013, Jeff Martin, Tim Bacon +Copyright (c) 2001-2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -789,9 +789,10 @@ // // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0), // ELEMENT_TAG_NAME(foo), ELEMENT_NUM_ATTRIBUTE(none), // SCHEMA_LOCATION(none), NO_NAMESPACE_SCHEMA_LOCATION(none) - assertEquals(14, count[0]); + assertEquals(15, count[0]); } public void testMatchTrackerSetViaEngine() throws Exception { @@ -816,8 +817,9 @@ // // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), - // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(12, count[0]); + // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) + assertEquals(13, count[0]); } public void testMatchTrackerSetViaOverrideOnEngine() throws Exception { @@ -843,8 +845,9 @@ // // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), - // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(12, count[0]); + // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) + assertEquals(13, count[0]); } public void testMatchTrackerSetViaNewEngine() throws Exception { @@ -869,9 +872,10 @@ // // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0), // ELEMENT_TAG_NAME(foo), ELEMENT_NUM_ATTRIBUTE(none), // SCHEMA_LOCATION(none), NO_NAMESPACE_SCHEMA_LOCATION(none) - assertEquals(14, count[0]); + assertEquals(15, count[0]); } public void testMatchTrackerSetViaOverrideOnNewEngine() throws Exception { @@ -897,9 +901,10 @@ // // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0), // ELEMENT_TAG_NAME(foo), ELEMENT_NUM_ATTRIBUTE(none), // SCHEMA_LOCATION(none), NO_NAMESPACE_SCHEMA_LOCATION(none) - assertEquals(14, count[0]); + assertEquals(15, count[0]); } public void testCDATAAndIgnoreWhitespace() throws Exception { Modified: trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_DifferenceEngine.java =================================================================== --- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_DifferenceEngine.java 2013-04-14 15:59:58 UTC (rev 526) +++ trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_DifferenceEngine.java 2013-04-14 16:29:49 UTC (rev 527) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2008,2010 Jeff Martin, Tim Bacon +Copyright (c) 2001-2008,2010,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -646,15 +646,15 @@ String test = "<stuff><item id=\"2\"/></stuff>"; listenToDifferences(control, test); assertEquals("15th difference type", - DifferenceEngine.HAS_CHILD_NODES_ID, + DifferenceEngine.CHILD_NODE_NOT_FOUND_ID, listener.comparingWhat); - assertEquals("15th difference control value", "true", + assertEquals("15th difference control value", "thing", listener.expected); - assertEquals("15th difference test value", "false", + assertEquals("15th difference test value", "null", listener.actual); - assertEquals("15th control xpath", "/stuff[1]/item[1]", + assertEquals("15th control xpath", "/stuff[1]/item[1]/thing[1]", listener.controlXpath); - assertEquals("15th test xpath", "/stuff[1]/item[1]", + assertNull("15th test xpath should be null but is " + listener.testXpath, listener.testXpath); } @@ -857,8 +857,9 @@ d.compare(control, test, listener, null); // NODE_TYPE (not null), NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), - // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(7, count[0]); + // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) + assertEquals(8, count[0]); } public void testMatchTrackerSetViaSetter() throws Exception { @@ -873,8 +874,9 @@ engine.compare(control, test, listener, null); // NODE_TYPE (not null), NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), - // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(7, count[0]); + // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) + assertEquals(8, count[0]); } /** Modified: trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java =================================================================== --- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java 2013-04-14 15:59:58 UTC (rev 526) +++ trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java 2013-04-14 16:29:49 UTC (rev 527) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 200, Jeff Martin, Tim Bacon +Copyright (c) 2001-2008,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -146,9 +146,9 @@ new Diff(control, dissimilarTest)); dissimilarDetailedDiff.overrideDifferenceListener(listener); List differences = dissimilarDetailedDiff.getAllDifferences(); - assertEquals("has children, wrong number of attributes, missing attribute, different attribute value, and missing text node. " + assertEquals("has children, wrong number of attributes, missing attribute, different attribute value, number of children and missing text node. " + dissimilarDetailedDiff.toString(), - 5, differences.size()); + 6, differences.size()); int recoverable = 0; for (Iterator iter = differences.iterator(); iter.hasNext(); ) { Difference aDifference = (Difference) iter.next(); Modified: trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_NewDifferenceEngine.java =================================================================== --- trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_NewDifferenceEngine.java 2013-04-14 15:59:58 UTC (rev 526) +++ trunk/xmlunit/src/tests/java-legacy/org/custommonkey/xmlunit/test_NewDifferenceEngine.java 2013-04-14 16:29:49 UTC (rev 527) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2008,2010 Jeff Martin, Tim Bacon +Copyright (c) 2001-2008,2010,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -255,11 +255,11 @@ String test = "<stuff><item id=\"2\"/></stuff>"; listenToDifferences(control, test); assertEquals("15th difference type", - NewDifferenceEngine.HAS_CHILD_NODES_ID, + NewDifferenceEngine.CHILD_NODELIST_LENGTH_ID, listener.comparingWhat); - assertEquals("15th difference control value", "true", + assertEquals("15th difference control value", "1", listener.expected); - assertEquals("15th difference test value", "false", + assertEquals("15th difference test value", "0", listener.actual); assertEquals("15th control xpath", "/stuff[1]/item[1]", listener.controlXpath); @@ -390,9 +390,10 @@ d.compare(control, test, listener, null); // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0), // ELEMENT_TAG_NAME(foo), ELEMENT_NUM_ATTRIBUTE(none), // SCHEMA_LOCATION(none), NO_NAMESPACE_SCHEMA_LOCATION(none) - assertEquals(8, count[0]); + assertEquals(9, count[0]); } public void testMatchTrackerSetViaSetter() throws Exception { @@ -407,9 +408,10 @@ engine.compare(control, test, listener, null); // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) // ELEMENT_TAG_NAME(foo), ELEMENT_NUM_ATTRIBUTE(none), // SCHEMA_LOCATION(none), NO_NAMESPACE_SCHEMA_LOCATION(none) - assertEquals(8, count[0]); + assertEquals(9, count[0]); } /** Modified: trunk/xmlunit/src/user-guide/XMLUnit-Java.xml =================================================================== --- trunk/xmlunit/src/user-guide/XMLUnit-Java.xml 2013-04-14 15:59:58 UTC (rev 526) +++ trunk/xmlunit/src/user-guide/XMLUnit-Java.xml 2013-04-14 16:29:49 UTC (rev 527) @@ -3695,6 +3695,46 @@ </section> </section> + <section id="Changes 1.5"> + <title>Changes from XMLUnit 1.4 to 1.5</title> + + <section id="Breaking Changes 1.5"> + <title>Breaking Changes</title> + + <itemizedlist> + <listitem> + If one node in the comparison has children while the other + one has not, XMLUnit 1.5 will signal a + <literal>CHILD_NODELIST_LENGTH</literal> difference and + <literal>CHILD_NODE_NOT_FOUND</literal> + differences for each child node of the node that has + children in addition to a <literal>HAS_CHILD_NODES</literal> difference. + <ulink + href="https://sourceforge.net/p/xmlunit/bugs/60/">Issue + 60</ulink> + </listitem> + </itemizedlist> + </section> + + <section id="New Features 1.5"> + <title>New Features</title> + + <itemizedlist> + <listitem> + </listitem> + </itemizedlist> + </section> + + <section id="Bugfixes 1.5"> + <title>Important Bug Fixes</title> + + <itemizedlist> + <listitem> + </listitem> + </itemizedlist> + </section> + </section> + </appendix> </article> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-14 16:00:02
|
Revision: 526 http://sourceforge.net/p/xmlunit/code/526 Author: bodewig Date: 2013-04-14 15:59:58 +0000 (Sun, 14 Apr 2013) Log Message: ----------- Issue 60: if elements without children can create 'CHILD_NODELIST_LENGTH' differences, they must also fire the corresponding MatchTracker events Modified Paths: -------------- branches/xmlunit-1.x/src/java/org/custommonkey/xmlunit/DifferenceEngine.java branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DetailedDiff.java branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_Diff.java branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java Modified: branches/xmlunit-1.x/src/java/org/custommonkey/xmlunit/DifferenceEngine.java =================================================================== --- branches/xmlunit-1.x/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2013-04-14 15:00:45 UTC (rev 525) +++ branches/xmlunit-1.x/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2013-04-14 15:59:58 UTC (rev 526) @@ -320,20 +320,21 @@ protected void compareNodeChildren(Node control, Node test, DifferenceListener listener, ElementQualifier elementQualifier) throws DifferenceFoundException { + + List controlChildren = nodeList2List(control.getChildNodes()); + List testChildren = nodeList2List(test.getChildNodes()); + + Integer controlLength = new Integer(controlChildren.size()); + Integer testLength = new Integer(testChildren.size()); + compare(controlLength, testLength, control, test, listener, + CHILD_NODELIST_LENGTH); + if (control.hasChildNodes() || test.hasChildNodes()) { - List controlChildren = nodeList2List(control.getChildNodes()); - List testChildren = nodeList2List(test.getChildNodes()); - - Integer controlLength = new Integer(controlChildren.size()); - Integer testLength = new Integer(testChildren.size()); - compare(controlLength, testLength, control, test, listener, - CHILD_NODELIST_LENGTH); - - if (controlLength.intValue() == 0) { + if (!control.hasChildNodes()) { for (Iterator iter = testChildren.iterator(); iter.hasNext();) { missingNode(null, (Node) iter.next(), listener); } - } else if (testLength.intValue() == 0) { + } else if (!test.hasChildNodes()) { for (Iterator iter = controlChildren.iterator(); iter.hasNext();) { missingNode((Node) iter.next(), null, listener); } Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DetailedDiff.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DetailedDiff.java 2013-04-14 15:00:45 UTC (rev 525) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DetailedDiff.java 2013-04-14 15:59:58 UTC (rev 526) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2008,2010 Jeff Martin, Tim Bacon +Copyright (c) 2001-2008,2010,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_Diff.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_Diff.java 2013-04-14 15:00:45 UTC (rev 525) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_Diff.java 2013-04-14 15:59:58 UTC (rev 526) @@ -786,8 +786,9 @@ // // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), - // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(12, count[0]); + // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) + assertEquals(13, count[0]); } public void testMatchTrackerSetViaEngine() throws Exception { @@ -812,8 +813,9 @@ // // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), - // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(12, count[0]); + // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) + assertEquals(13, count[0]); } public void testMatchTrackerSetViaOverrideOnEngine() throws Exception { @@ -840,7 +842,8 @@ // NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(12, count[0]); + // CHILD_NODELIST_LENGTH(0) + assertEquals(13, count[0]); } public void testCDATAAndIgnoreWhitespace() throws Exception { Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java 2013-04-14 15:00:45 UTC (rev 525) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java 2013-04-14 15:59:58 UTC (rev 526) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2008, Jeff Martin, Tim Bacon +Copyright (c) 2001-2008,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -857,8 +857,9 @@ d.compare(control, test, listener, null); // NODE_TYPE (not null), NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), - // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(7, count[0]); + // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) + assertEquals(8, count[0]); } public void testMatchTrackerSetViaSetter() throws Exception { @@ -873,8 +874,9 @@ engine.compare(control, test, listener, null); // NODE_TYPE (not null), NODE_TYPE(Element), NAMESPACE_URI(none), // NAMESPACE_PREFIX(none), ELEMENT_TAG_NAME(foo), - // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false) - assertEquals(7, count[0]); + // ELEMENT_NUM_ATTRIBUTE(none), HAS_CHILD_NODES(false), + // CHILD_NODELIST_LENGTH(0) + assertEquals(8, count[0]); } /** Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java 2013-04-14 15:00:45 UTC (rev 525) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java 2013-04-14 15:59:58 UTC (rev 526) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 200, Jeff Martin, Tim Bacon +Copyright (c) 2001-2008,2013 Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-04-14 15:00:48
|
Revision: 525 http://sourceforge.net/p/xmlunit/code/525 Author: bodewig Date: 2013-04-14 15:00:45 +0000 (Sun, 14 Apr 2013) Log Message: ----------- signal CHILD_NODELIST_LENGTH and CHILD_NODE_NOT_FOUND in addition to HAS_CHILD_NODES - patch by Eric Siegerman - closes issue 60 Modified Paths: -------------- branches/xmlunit-1.x/src/java/org/custommonkey/xmlunit/DifferenceEngine.java branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DetailedDiff.java branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java Modified: branches/xmlunit-1.x/src/java/org/custommonkey/xmlunit/DifferenceEngine.java =================================================================== --- branches/xmlunit-1.x/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2013-02-07 20:50:46 UTC (rev 524) +++ branches/xmlunit-1.x/src/java/org/custommonkey/xmlunit/DifferenceEngine.java 2013-04-14 15:00:45 UTC (rev 525) @@ -320,7 +320,7 @@ protected void compareNodeChildren(Node control, Node test, DifferenceListener listener, ElementQualifier elementQualifier) throws DifferenceFoundException { - if (control.hasChildNodes() && test.hasChildNodes()) { + if (control.hasChildNodes() || test.hasChildNodes()) { List controlChildren = nodeList2List(control.getChildNodes()); List testChildren = nodeList2List(test.getChildNodes()); @@ -328,8 +328,19 @@ Integer testLength = new Integer(testChildren.size()); compare(controlLength, testLength, control, test, listener, CHILD_NODELIST_LENGTH); - compareNodeList(controlChildren, testChildren, - controlLength.intValue(), listener, elementQualifier); + + if (controlLength.intValue() == 0) { + for (Iterator iter = testChildren.iterator(); iter.hasNext();) { + missingNode(null, (Node) iter.next(), listener); + } + } else if (testLength.intValue() == 0) { + for (Iterator iter = controlChildren.iterator(); iter.hasNext();) { + missingNode((Node) iter.next(), null, listener); + } + } else { + compareNodeList(controlChildren, testChildren, + controlLength.intValue(), listener, elementQualifier); + } } } Modified: branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml =================================================================== --- branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml 2013-02-07 20:50:46 UTC (rev 524) +++ branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml 2013-04-14 15:00:45 UTC (rev 525) @@ -3695,6 +3695,46 @@ </section> </section> + <section id="Changes 1.5"> + <title>Changes from XMLUnit 1.4 to 1.5</title> + + <section id="Breaking Changes 1.5"> + <title>Breaking Changes</title> + + <itemizedlist> + <listitem> + If one node in the comparison has children while the other + one has not, XMLUnit 1.5 will signal a + <literal>CHILD_NODELIST_LENGTH</literal> difference and + <literal>CHILD_NODE_NOT_FOUND</literal> + differences for each child node of the node that has + children in addition to a <literal>HAS_CHILD_NODES</literal> difference. + <ulink + href="https://sourceforge.net/p/xmlunit/bugs/60/">Issue + 60</ulink> + </listitem> + </itemizedlist> + </section> + + <section id="New Features 1.5"> + <title>New Features</title> + + <itemizedlist> + <listitem> + </listitem> + </itemizedlist> + </section> + + <section id="Bugfixes 1.5"> + <title>Important Bug Fixes</title> + + <itemizedlist> + <listitem> + </listitem> + </itemizedlist> + </section> + </section> + </appendix> </article> Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DetailedDiff.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DetailedDiff.java 2013-02-07 20:50:46 UTC (rev 524) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DetailedDiff.java 2013-04-14 15:00:45 UTC (rev 525) @@ -63,7 +63,7 @@ private void assertExpectedDifferencesFirstForecastControl(List differences, DetailedDiff detailedDiff) { - assertEquals("size: " + detailedDiff, 5, differences.size()); + assertEquals("size: " + detailedDiff, 7, differences.size()); assertEquals("first: " + detailedDiff, DifferenceConstants.ELEMENT_NUM_ATTRIBUTES, differences.get(0)); assertEquals("second: " + detailedDiff, @@ -74,6 +74,10 @@ DifferenceConstants.ATTR_SEQUENCE, differences.get(3)); assertEquals("fifth: " + detailedDiff, DifferenceConstants.HAS_CHILD_NODES, differences.get(4)); + assertEquals("sixth: " + detailedDiff, + DifferenceConstants.CHILD_NODELIST_LENGTH, differences.get(5)); + assertEquals("seventh: " + detailedDiff, + DifferenceConstants.CHILD_NODE_NOT_FOUND, differences.get(6)); } public void testAllDifferencesSecondForecastControl() throws Exception { @@ -82,7 +86,7 @@ List differences = detailedDiff.getAllDifferences(); - assertEquals("size: " + detailedDiff, 5, differences.size()); + assertEquals("size: " + detailedDiff, 7, differences.size()); assertEquals("first: " + detailedDiff, DifferenceConstants.ELEMENT_NUM_ATTRIBUTES, differences.get(0)); assertEquals("second: " + detailedDiff, @@ -94,6 +98,10 @@ differences.get(3)); assertEquals("fifth: " + detailedDiff, DifferenceConstants.HAS_CHILD_NODES, differences.get(4)); + assertEquals("sixth: " + detailedDiff, + DifferenceConstants.CHILD_NODELIST_LENGTH, differences.get(5)); + assertEquals("seventy: " + detailedDiff, + DifferenceConstants.CHILD_NODE_NOT_FOUND, differences.get(6)); } public void testPrototypeIsADetailedDiff() throws Exception { @@ -116,15 +124,18 @@ new InputSource(new FileReader(test))) ); List l = differencesWithWhitespace.getAllDifferences(); - int unmatchedNodes = 0; + int unmatchedNodeDiffs = 0; + int hasChildNodeDiffs = 0; for (Iterator iter = l.iterator(); iter.hasNext();) { Difference d = (Difference) iter.next(); if (d.getId() == DifferenceConstants.CHILD_NODE_NOT_FOUND_ID) { - unmatchedNodes++; + unmatchedNodeDiffs++; + } else if (d.getId() == DifferenceConstants.HAS_CHILD_NODES_ID) { + hasChildNodeDiffs++; } } - assertEquals(1402 + unmatchedNodes, + assertEquals(1402 + hasChildNodeDiffs + unmatchedNodeDiffs, differencesWithWhitespace.getAllDifferences().size()); try { @@ -133,14 +144,17 @@ new Diff(new FileReader(control), new FileReader(test)); DetailedDiff detailedDiff = new DetailedDiff(prototype); List differences = detailedDiff.getAllDifferences(); - unmatchedNodes = 0; + unmatchedNodeDiffs = 0; + hasChildNodeDiffs = 0; for (Iterator iter = differences.iterator(); iter.hasNext();) { Difference d = (Difference) iter.next(); if (d.getId() == DifferenceConstants.CHILD_NODE_NOT_FOUND_ID) { - unmatchedNodes++; + unmatchedNodeDiffs++; + } else if (d.getId() == DifferenceConstants.HAS_CHILD_NODES_ID) { + hasChildNodeDiffs++; } } - assertEquals(40 + unmatchedNodes, differences.size()); + assertEquals(40 + hasChildNodeDiffs + unmatchedNodeDiffs, differences.size()); SimpleXpathEngine xpathEngine = new SimpleXpathEngine(); Document controlDoc = Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java 2013-02-07 20:50:46 UTC (rev 524) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_DifferenceEngine.java 2013-04-14 15:00:45 UTC (rev 525) @@ -646,15 +646,15 @@ String test = "<stuff><item id=\"2\"/></stuff>"; listenToDifferences(control, test); assertEquals("15th difference type", - DifferenceEngine.HAS_CHILD_NODES_ID, + DifferenceEngine.CHILD_NODE_NOT_FOUND_ID, listener.comparingWhat); - assertEquals("15th difference control value", "true", + assertEquals("15th difference control value", "thing", listener.expected); - assertEquals("15th difference test value", "false", + assertEquals("15th difference test value", "null", listener.actual); - assertEquals("15th control xpath", "/stuff[1]/item[1]", + assertEquals("15th control xpath", "/stuff[1]/item[1]/thing[1]", listener.controlXpath); - assertEquals("15th test xpath", "/stuff[1]/item[1]", + assertNull("15th test xpath should be null but is " + listener.testXpath, listener.testXpath); } Modified: branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java =================================================================== --- branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java 2013-02-07 20:50:46 UTC (rev 524) +++ branches/xmlunit-1.x/tests/java/org/custommonkey/xmlunit/test_IgnoreTextAndAttributeValuesDifferenceListener.java 2013-04-14 15:00:45 UTC (rev 525) @@ -146,9 +146,10 @@ new Diff(control, dissimilarTest)); dissimilarDetailedDiff.overrideDifferenceListener(listener); List differences = dissimilarDetailedDiff.getAllDifferences(); - assertEquals("wrong number of attributes, missing attribute, different attribute value, and missing text node. " + assertEquals("wrong number of attributes, missing attribute, different attribute value, presence of subnodes, " + + "number of subnodes, missing text node. " + dissimilarDetailedDiff.toString(), - 4, differences.size()); + 6, differences.size()); int recoverable = 0; for (Iterator iter = differences.iterator(); iter.hasNext(); ) { Difference aDifference = (Difference) iter.next(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2013-03-03 10:28:46
|
Bugs item #3606233, was opened at 2013-02-27 08:29 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=3606233&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Java 1.3 Status: Open Resolution: None Priority: 5 Private: No Submitted By: David North (dtn-cfl) Assigned to: Nobody/Anonymous (nobody) Summary: Static methods on XMLUnit are problematic Initial Comment: The static methods such as XMLUnit.setIngoreWhitespace are a problem. We have a large suite of unit tests and run them in parallel, with several different threads running tests at any one time. If a test wants to ignore whitespace and another does not, they cannot be run in parallel as the static state manipulated by these methods is global. Would it be possible to re-organise XMLUnit so that a non-static mode of operation was supported, with some kind of builder/factory containing this state instead so each thread could have its own instance? I am happy to attempt a patch for this if it sounds acceptable. ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2013-03-03 02:28 Message: I fully agree with you, the statics are more than just annoying. In fact, I've started to rewrite XMLUnit from scratch in svn trunk several years ago, I just ran out of steam before it was finished. It doesn't lack much more than proper documentation and maybe a builder for difference engines. You may want to take a look. Right now it is dormant since I spend my limited time elsewhere - part of the reason for this is lack of interest by users (at least that's how I perceive it) and that I feel I'm designing APIs inside a vacuum. Maybe you can change that. :-) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=3606233&group_id=23187 |
From: SourceForge.net <no...@so...> - 2013-02-27 16:29:03
|
Bugs item #3606233, was opened at 2013-02-27 08:29 Message generated for change (Tracker Item Submitted) made by dtn-cfl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=3606233&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Java 1.3 Status: Open Resolution: None Priority: 5 Private: No Submitted By: David North (dtn-cfl) Assigned to: Nobody/Anonymous (nobody) Summary: Static methods on XMLUnit are problematic Initial Comment: The static methods such as XMLUnit.setIngoreWhitespace are a problem. We have a large suite of unit tests and run them in parallel, with several different threads running tests at any one time. If a test wants to ignore whitespace and another does not, they cannot be run in parallel as the static state manipulated by these methods is global. Would it be possible to re-organise XMLUnit so that a non-static mode of operation was supported, with some kind of builder/factory containing this state instead so each thread could have its own instance? I am happy to attempt a patch for this if it sounds acceptable. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=3606233&group_id=23187 |
From: SourceForge.net <no...@so...> - 2013-02-12 09:40:47
|
Feature Requests item #3602981, was opened at 2013-02-01 07:05 Message generated for change (Comment added) made by dportabella You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=3602981&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: David Portabella Clotet (dportabella) Assigned to: Nobody/Anonymous (nobody) Summary: Diff failswith xsi:type and different prefix Initial Comment: This code: import org.custommonkey.xmlunit.Diff; String result = "<ns1:Square xsi:type=\"ns1:Shape\" xmlns:ns1=\"http://example.com/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; String correct = "<ns2:Square xsi:type=\"ns2:Shape\" xmlns:ns2=\"http://example.com/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; Diff diff = new Diff(result, correct); System.out.println("diff:" + diff); System.out.println("diff.similar(): " + diff.similar()); results in: diff: org.custommonkey.xmlunit.Diff [not identical] Expected namespace prefix 'ns1' but was 'ns2' - comparing <ns1:Square...> at /Square[1] to <ns2:Square...> at /Square[1] [different] Expected attribute value 'ns1:Shape' but was 'ns2:Shape' - comparing <ns1:Square xsi:type="ns1:Shape"...> at /Square[1]/@type to <ns2:Square xsi:type="ns2:Shape"...> at /Square[1]/@type diff.similar(): false --- someone posted a fix here: http://stackoverflow.com/questions/14647861/xmlunit-diff-returns-similar-false-if-there-is-a-xsitype-and-a-different-namesp/14648786#14648786 ---------------------------------------------------------------------- >Comment By: David Portabella Clotet (dportabella) Date: 2013-02-12 01:40 Message: Hi, I confirm that version 1.4 has made its way to maven central, and that it solves the problem for the case i reported, and other cases also. thanks, david ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-07 11:46 Message: XMLUnit for Java 1.4 has just been released. It hasn't made its way to Maven central, yet, but that's just a matter of time. ---------------------------------------------------------------------- Comment By: David Portabella Clotet (dportabella) Date: 2013-02-06 06:44 Message: Hi, I tried your last revision, 517, and it works correctly! for the case i reported, and other cases also. please let me now about your new release. regards, David ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-03 02:43 Message: The only remaining xsi-attribute is xsi:nil which - I think - is handled reasonably. I'm preparing a new release, would be good if you could test the fix before I finalize it. If you have any trouble building XMLUnit from source, I'll be happy to provide a binary. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-02 06:53 Message: This should be fixed with svn revision 502 in the 1.x Branch https://xmlunit.svn.sourceforge.net/svnroot/xmlunit/branches/xmlunit-1.x Can you try to build it yourself to see whether it works for you? Before I cut a new release I want to look around the Schema Instance namespace to see whether there is anything else XMLUnit could support in a better way. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-01 08:22 Message: Actually, XMLUnit doesn't really support much of the XML-Schema Instance stuff at all. I've started to fix it in the 1.x branch and simply ignoring the namespace prefix is trivial for this case, making sure the prefixes map to the same NS uris seems more difficult, at least as long as I'm in Java 1.4 land. Once this is fixed I'll roll a new release. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=3602981&group_id=23187 |
From: <bo...@us...> - 2013-02-07 20:50:54
|
Revision: 524 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=524&view=rev Author: bodewig Date: 2013-02-07 20:50:46 +0000 (Thu, 07 Feb 2013) Log Message: ----------- merge build and user-guide changes from 1.x branch Modified Paths: -------------- trunk/xmlunit/build.xml trunk/xmlunit/docbook.xml trunk/xmlunit/src/user-guide/XMLUnit-Java.xml Property Changed: ---------------- trunk/xmlunit/build.xml trunk/xmlunit/docbook.xml trunk/xmlunit/src/user-guide/XMLUnit-Java.xml Modified: trunk/xmlunit/build.xml =================================================================== --- trunk/xmlunit/build.xml 2013-02-07 20:50:15 UTC (rev 523) +++ trunk/xmlunit/build.xml 2013-02-07 20:50:46 UTC (rev 524) @@ -227,7 +227,6 @@ <fileset dir="${src.dir}/etc"> <include name="xmlunit.pom"/> <include name="xmlunit-ivy.xml"/> - <include name="xmlunit-maven-metadata.xml"/> </fileset> <mapper type="glob" from="xmlunit*" to="xmlunit-${xmlunit.version}*"/> <filterset> @@ -276,6 +275,12 @@ <target name="dist" depends="clean,bindist,srcdist,compile-userguide-examples" description="creates the distribution files"> + <jar jarfile="${lib.dir}/xmlunit-${xmlunit.version}-sources.jar" + basedir="${src.dir}/java" + /> + <jar jarfile="${lib.dir}/xmlunit-${xmlunit.version}-javadoc.jar" + basedir="${docs.dir}/api" + /> <checksum algorithm="md5"> <fileset dir="${dist.dir}"> <include name="*.zip"/> @@ -286,6 +291,14 @@ <include name="*.zip"/> </fileset> </checksum> + <checksum algorithm="md5"> + <fileset dir="${lib.dir}"/> + </checksum> + <checksum algorithm="sha1"> + <fileset dir="${lib.dir}"> + <exclude name="*.md5"/> + </fileset> + </checksum> </target> <target name="compile-userguide-examples" depends="compile"> Property changes on: trunk/xmlunit/build.xml ___________________________________________________________________ Added: svn:mergeinfo + /branches/xmlunit-1.x/build.xml:355,521-522 Modified: trunk/xmlunit/docbook.xml =================================================================== --- trunk/xmlunit/docbook.xml 2013-02-07 20:50:15 UTC (rev 523) +++ trunk/xmlunit/docbook.xml 2013-02-07 20:50:46 UTC (rev 524) @@ -1,3 +1,35 @@ +<!-- +Copyright (c) 2001-2013, Jeff Martin, Tim Bacon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +--> <project> <!-- allow overrides --> <property file="docbook.properties"/> @@ -5,6 +37,7 @@ <!-- location of Docbook Stylesheets and dblatex --> <property name="db5.xsl" location="../../docbook/docbook5-xsl-1.72.0"/> <property name="dblatex" value="/usr/bin/dblatex"/> + <property name="xsltproc" value="/usr/bin/xsltproc"/> <property name="html.dir" location="${userguide.docs.dir}/html"/> <property name="user.guide" value="XMLUnit-Java"/> @@ -20,11 +53,36 @@ targetfile="${html.dir}/index.html"/> </target> - <target name="users-guide-html" depends="-html-needs-refresh?" - unless="HTML is up-to-date" - description="Creates HTML version of the User's Guide"> + <target name="-xsltproc-available?" depends="-html-needs-refresh?"> + <available property="xsltproc available" + file="${xsltproc}"/> + <condition property="run TraX"> + <not> + <or> + <isset property="xsltproc available"/> + <isset property="HTML is up-to-date"/> + </or> + </not> + </condition> + <condition property="run xsltproc"> + <and> + <isset property="xsltproc available"/> + <not> + <isset property="HTML is up-to-date"/> + </not> + </and> + </condition> + </target> + + <target name="-users-guide-html-pre" depends="-html-needs-refresh?" + unless="HTML is up-to-date"> <delete dir="${html.dir}" quiet="true"/> <mkdir dir="${html.dir}"/> + </target> + + <target name="-users-guide-html-trax" + depends="-xsltproc-available?,-users-guide-html-pre" + if="run TraX"> <xslt basedir="${src.userguide.dir}" destdir="${html.dir}" @@ -34,10 +92,33 @@ <param name="section.autolabel" expression="1"/> <param name="section.label.includes.component.label" expression="1"/> </xslt> - <copy file="${src.dir}/site/xmlunit.png" toDir="${html.dir}"/> <delete file="${html.dir}/${user.guide}.html" quiet="true"/> </target> + <target name="-users-guide-html-xsltproc" + depends="-xsltproc-available?,-users-guide-html-pre" + if="run xsltproc"> + <exec executable="${xsltproc}" failonerror="true"> + <arg value="-o"/> + <!-- xsltproc needs the trailing slash to work properly --> + <arg value="${html.dir}/"/> + <arg value="--param"/> + <arg value="section.autolabel"/> + <arg value="1"/> + <arg value="--param"/> + <arg value="section.label.includes.component.label"/> + <arg value="1"/> + <arg file="${db5.xsl}/html/chunk.xsl"/> + <arg file="${src.userguide.dir}/${user.guide}.xml"/> + </exec> + </target> + + <target name="users-guide-html" + depends="-users-guide-html-trax,-users-guide-html-xsltproc" + unless="HTML is up-to-date" + description="Creates HTML version of the User's Guide"> + </target> + <target name="-check-os"> <condition property="isWindows"> <os family="windows"/> Property changes on: trunk/xmlunit/docbook.xml ___________________________________________________________________ Added: svn:mergeinfo + /branches/xmlunit-1.x/docbook.xml:355,513-517 Modified: trunk/xmlunit/src/user-guide/XMLUnit-Java.xml =================================================================== --- trunk/xmlunit/src/user-guide/XMLUnit-Java.xml 2013-02-07 20:50:15 UTC (rev 523) +++ trunk/xmlunit/src/user-guide/XMLUnit-Java.xml 2013-02-07 20:50:46 UTC (rev 524) @@ -1,13 +1,40 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE article PUBLIC "-//OASIS//DTD Simplified DocBook XML V1.1b1//EN" "http://docbook.org/xml/simple/1.1b1/sdocbook.dtd"> +<!-- +Copyright (c) 2001-2013, Jeff Martin, Tim Bacon +All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +--> + <article> - <title>XMLUnit Java User's Guide - <inlinemediaobject><imageobject> - <imagedata fileref="xmlunit.png" width="331" depth="100" - valign="middle" format="PNG"/> - </imageobject></inlinemediaobject> - </title> + <title>XMLUnit Java User's Guide</title> <articleinfo> <authorgroup> <author> @@ -44,6 +71,11 @@ <date>September 2009</date> <revremark>Documentation for XMLUnit Java 1.3</revremark> </revision> + <revision> + <revnumber>1.4</revnumber> + <date>February 2013</date> + <revremark>Documentation for XMLUnit Java 1.4</revremark> + </revision> </revhistory> </articleinfo> @@ -2830,8 +2862,10 @@ (<literal>String</literal>) prefixes as keys and (<literal>String</literal>) namespace URIs as values.</para> - <para>The empty string is used as prefix for the default - namespace of a document.</para> + <para>Note there is nothing like a default namespace in XPath + selectors. If you are using namespaces in your XPath, all + namespaces need a prefix (of length greater than zero). This + is independent of the prefixes used in your document.</para> <para>The following example is taken from XMLUnit's own tests. It demonstrates that the namespace prefix of the document under @@ -3618,7 +3652,7 @@ <section id="Changes 1.4"> <title>Changes from XMLUnit 1.3 to 1.4</title> - <section id="Breaking Changes 1.3"> + <section id="Breaking Changes 1.4"> <title>Breaking Changes</title> <!--itemizedlist> @@ -3628,8 +3662,14 @@ <section id="New Features 1.4"> <title>New Features</title> - <!--itemizedlist> - </itemizedlist--> + <itemizedlist> + <listitem> + xsi:type attributes now have their value interpreted as a + QName and will compare as identical if their namespace URI + and local names match even if they use different + prefixes. <ulink url="https://sourceforge.net/tracker/?func=detail&aid=3602981&group_id=23187&atid=377771">Issue 3602981</ulink> + </listitem> + </itemizedlist> </section> <section id="Bugfixes 1.4"> @@ -3639,9 +3679,18 @@ <listitem> <literal>XMLTestCase</literal>'s and <literal>XMLAssert</literal>'s <literal>assertXpathsEqual</literal> methods threw an - exception at least one XPath matched an attribute. <ulink + exception when at least one XPath matched an attribute. <ulink url="https://sourceforge.net/tracker/?func=detail&aid=3290264&group_id=23187&atid=377768">Issue 377768</ulink>. </listitem> + + <listitem> + <literal>FloatingPointTolerantDifferenceListener</literal> + expected numbers to differ by less than the given + tolerance rather than "less or equal" than as the docs said. + <ulink + href="https://sourceforge.net/tracker/index.php?func=detail&aid=3593368&group_id=23187&atid=377768">Issue + 3593368</ulink> + </listitem> </itemizedlist> </section> </section> Property changes on: trunk/xmlunit/src/user-guide/XMLUnit-Java.xml ___________________________________________________________________ Added: svn:mergeinfo + /branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml:346,355,494,497-517 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-02-07 20:50:22
|
Revision: 523 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=523&view=rev Author: bodewig Date: 2013-02-07 20:50:15 +0000 (Thu, 07 Feb 2013) Log Message: ----------- 1.4 released Modified Paths: -------------- trunk/xmlunit/src/site/index.html Modified: trunk/xmlunit/src/site/index.html =================================================================== --- trunk/xmlunit/src/site/index.html 2013-02-07 20:35:30 UTC (rev 522) +++ trunk/xmlunit/src/site/index.html 2013-02-07 20:50:15 UTC (rev 523) @@ -60,8 +60,8 @@ <tr> <td colspan="2"> <p>The current stable release is <a - href="https://sourceforge.net/projects/xmlunit/files/xmlunit%20for%20Java/XMLUnit%20for%20Java%201.3/">XMLUnit - 1.3</a>, September 2009.</p> + href="https://sourceforge.net/projects/xmlunit/files/xmlunit%20for%20Java/XMLUnit%20for%20Java%201.4/">XMLUnit + 1.4</a>, February 2013.</p> <p>XMLUnit for Java provides two JUnit extension classes, <code>XMLAssert</code> and <code>XMLTestCase</code>, and a set of supporting classes (e.g. <code>Diff</code>, <code>DetailedDiff</code>,<code>Transform</code>,<code>SimpleXpathEngine</code>,<code>Validator</code>,<code>NodeTest</code>) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-02-07 20:35:36
|
Revision: 522 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=522&view=rev Author: bodewig Date: 2013-02-07 20:35:30 +0000 (Thu, 07 Feb 2013) Log Message: ----------- prepare for releasing via Sonatype's Open Source Repository Hosting service, which requires additional information/jars Modified Paths: -------------- branches/xmlunit-1.x/build.xml branches/xmlunit-1.x/src/etc/xmlunit.pom Removed Paths: ------------- branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml Modified: branches/xmlunit-1.x/build.xml =================================================================== --- branches/xmlunit-1.x/build.xml 2013-02-07 08:22:33 UTC (rev 521) +++ branches/xmlunit-1.x/build.xml 2013-02-07 20:35:30 UTC (rev 522) @@ -215,7 +215,6 @@ <fileset dir="${src.dir}/etc"> <include name="xmlunit.pom"/> <include name="xmlunit-ivy.xml"/> - <include name="xmlunit-maven-metadata.xml"/> </fileset> <mapper type="glob" from="xmlunit*" to="xmlunit-${xmlunit.version}*"/> <filterset> @@ -266,6 +265,12 @@ <target name="dist" depends="bindist,srcdist,compile-userguide-examples" description="creates the distribution files"> + <jar jarfile="${lib.dir}/xmlunit-${xmlunit.version}-sources.jar" + basedir="${src.dir}/java" + /> + <jar jarfile="${lib.dir}/xmlunit-${xmlunit.version}-javadoc.jar" + basedir="${docs.dir}/api" + /> <checksum algorithm="md5"> <fileset dir="${dist.dir}"> <include name="*.zip"/> Deleted: branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml =================================================================== --- branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml 2013-02-07 08:22:33 UTC (rev 521) +++ branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml 2013-02-07 20:35:30 UTC (rev 522) @@ -1,48 +0,0 @@ -<?xml version="1.0"?> -<!-- -Copyright (c) 2007-2013, Jeff Martin, Tim Bacon -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of the xmlunit.sourceforge.net nor the names - of its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ---> -<metadata> - <groupId>@GROUP@</groupId> - <artifactId>@ARTIFACT@</artifactId> - <version>@VERSION@</version> - <versioning> - <versions> - <version>0.8</version> - <version>1.0</version> - <version>1.1</version> - <version>1.2</version> - <version>1.3</version> - <version>@VERSION@</version> - </versions> - </versioning> -</metadata> Modified: branches/xmlunit-1.x/src/etc/xmlunit.pom =================================================================== --- branches/xmlunit-1.x/src/etc/xmlunit.pom 2013-02-07 08:22:33 UTC (rev 521) +++ branches/xmlunit-1.x/src/etc/xmlunit.pom 2013-02-07 20:35:30 UTC (rev 522) @@ -56,6 +56,7 @@ </licenses> <scm> <url>http://xmlunit.svn.sourceforge.net/viewvc/xmlunit/</url> + <connection>scm:svn:https://xmlunit.svn.sourceforge.net/svnroot/xmlunit/branches/xmlunit-1.x</connection> </scm> <dependencies> <dependency> @@ -65,4 +66,13 @@ <optional>true</optional> </dependency> </dependencies> + <!-- Personally I'm not fond of the developers section but Sonatype's OSSRH + requires it --> + <developers> + <developer> + <id>bodewig</id> + <name>Stefan Bodewig</name> + <email>stefan.bodewig@freenet dot de</email> + </developer> + </developers> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2013-02-07 19:46:13
|
Feature Requests item #3602981, was opened at 2013-02-01 07:05 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=3602981&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: David Portabella Clotet (dportabella) Assigned to: Nobody/Anonymous (nobody) Summary: Diff failswith xsi:type and different prefix Initial Comment: This code: import org.custommonkey.xmlunit.Diff; String result = "<ns1:Square xsi:type=\"ns1:Shape\" xmlns:ns1=\"http://example.com/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; String correct = "<ns2:Square xsi:type=\"ns2:Shape\" xmlns:ns2=\"http://example.com/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; Diff diff = new Diff(result, correct); System.out.println("diff:" + diff); System.out.println("diff.similar(): " + diff.similar()); results in: diff: org.custommonkey.xmlunit.Diff [not identical] Expected namespace prefix 'ns1' but was 'ns2' - comparing <ns1:Square...> at /Square[1] to <ns2:Square...> at /Square[1] [different] Expected attribute value 'ns1:Shape' but was 'ns2:Shape' - comparing <ns1:Square xsi:type="ns1:Shape"...> at /Square[1]/@type to <ns2:Square xsi:type="ns2:Shape"...> at /Square[1]/@type diff.similar(): false --- someone posted a fix here: http://stackoverflow.com/questions/14647861/xmlunit-diff-returns-similar-false-if-there-is-a-xsitype-and-a-different-namesp/14648786#14648786 ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2013-02-07 11:46 Message: XMLUnit for Java 1.4 has just been released. It hasn't made its way to Maven central, yet, but that's just a matter of time. ---------------------------------------------------------------------- Comment By: David Portabella Clotet (dportabella) Date: 2013-02-06 06:44 Message: Hi, I tried your last revision, 517, and it works correctly! for the case i reported, and other cases also. please let me now about your new release. regards, David ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-03 02:43 Message: The only remaining xsi-attribute is xsi:nil which - I think - is handled reasonably. I'm preparing a new release, would be good if you could test the fix before I finalize it. If you have any trouble building XMLUnit from source, I'll be happy to provide a binary. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-02 06:53 Message: This should be fixed with svn revision 502 in the 1.x Branch https://xmlunit.svn.sourceforge.net/svnroot/xmlunit/branches/xmlunit-1.x Can you try to build it yourself to see whether it works for you? Before I cut a new release I want to look around the Schema Instance namespace to see whether there is anything else XMLUnit could support in a better way. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-01 08:22 Message: Actually, XMLUnit doesn't really support much of the XML-Schema Instance stuff at all. I've started to fix it in the 1.x branch and simply ignoring the namespace prefix is trivial for this case, making sure the prefixes map to the same NS uris seems more difficult, at least as long as I'm in Java 1.4 land. Once this is fixed I'll roll a new release. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=3602981&group_id=23187 |
From: <bo...@us...> - 2013-02-07 08:22:40
|
Revision: 521 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=521&view=rev Author: bodewig Date: 2013-02-07 08:22:33 +0000 (Thu, 07 Feb 2013) Log Message: ----------- Must sign artifiacts for Maven repo as well Modified Paths: -------------- branches/xmlunit-1.x/build.xml Modified: branches/xmlunit-1.x/build.xml =================================================================== --- branches/xmlunit-1.x/build.xml 2013-02-07 05:32:01 UTC (rev 520) +++ branches/xmlunit-1.x/build.xml 2013-02-07 08:22:33 UTC (rev 521) @@ -276,6 +276,14 @@ <include name="*.zip"/> </fileset> </checksum> + <checksum algorithm="md5"> + <fileset dir="${lib.dir}"/> + </checksum> + <checksum algorithm="sha1"> + <fileset dir="${lib.dir}"> + <exclude name="*.md5"/> + </fileset> + </checksum> </target> <target name="compile-userguide-examples" depends="compile"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-02-07 05:32:08
|
Revision: 520 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=520&view=rev Author: bodewig Date: 2013-02-07 05:32:01 +0000 (Thu, 07 Feb 2013) Log Message: ----------- bump version Modified Paths: -------------- branches/xmlunit-1.x/build.xml Modified: branches/xmlunit-1.x/build.xml =================================================================== --- branches/xmlunit-1.x/build.xml 2013-02-07 05:31:14 UTC (rev 519) +++ branches/xmlunit-1.x/build.xml 2013-02-07 05:32:01 UTC (rev 520) @@ -37,7 +37,7 @@ <property file="build.properties"/> <!-- Version --> - <property name="xmlunit.version" value="1.4alpha"/> + <property name="xmlunit.version" value="1.5alpha"/> <!-- some locations --> <property name="src.dir" value="src"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-02-07 05:31:23
|
Revision: 519 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=519&view=rev Author: bodewig Date: 2013-02-07 05:31:14 +0000 (Thu, 07 Feb 2013) Log Message: ----------- tag 1.4 release Added Paths: ----------- tags/XMLUnit-Java-1.4/ tags/XMLUnit-Java-1.4/LICENSE.txt tags/XMLUnit-Java-1.4/build.xml tags/XMLUnit-Java-1.4/src/etc/xmlunit-ivy.xml tags/XMLUnit-Java-1.4/src/etc/xmlunit-maven-metadata.xml tags/XMLUnit-Java-1.4/src/etc/xmlunit.pom tags/XMLUnit-Java-1.4/src/site/index.html Removed Paths: ------------- tags/XMLUnit-Java-1.4/LICENSE.txt tags/XMLUnit-Java-1.4/build.xml tags/XMLUnit-Java-1.4/src/etc/xmlunit-ivy.xml tags/XMLUnit-Java-1.4/src/etc/xmlunit-maven-metadata.xml tags/XMLUnit-Java-1.4/src/etc/xmlunit.pom tags/XMLUnit-Java-1.4/src/site/index.html Deleted: tags/XMLUnit-Java-1.4/LICENSE.txt =================================================================== --- branches/xmlunit-1.x/LICENSE.txt 2013-02-03 15:05:33 UTC (rev 517) +++ tags/XMLUnit-Java-1.4/LICENSE.txt 2013-02-07 05:31:14 UTC (rev 519) @@ -1,36 +0,0 @@ -/* -****************************************************************** -Copyright (c) 2001-2009, Jeff Martin, Tim Bacon -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of the xmlunit.sourceforge.net nor the names - of its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -****************************************************************** -*/ - Copied: tags/XMLUnit-Java-1.4/LICENSE.txt (from rev 518, branches/xmlunit-1.x/LICENSE.txt) =================================================================== --- tags/XMLUnit-Java-1.4/LICENSE.txt (rev 0) +++ tags/XMLUnit-Java-1.4/LICENSE.txt 2013-02-07 05:31:14 UTC (rev 519) @@ -0,0 +1,36 @@ +/* +****************************************************************** +Copyright (c) 2001-2013, Jeff Martin, Tim Bacon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +****************************************************************** +*/ + Deleted: tags/XMLUnit-Java-1.4/build.xml =================================================================== --- branches/xmlunit-1.x/build.xml 2013-02-03 15:05:33 UTC (rev 517) +++ tags/XMLUnit-Java-1.4/build.xml 2013-02-07 05:31:14 UTC (rev 519) @@ -1,292 +0,0 @@ -<?xml version="1.0"?> -<!-- -Copyright (c) 2001-2008, Jeff Martin, Tim Bacon -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of the xmlunit.sourceforge.net nor the names - of its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ---> -<project name="xmlunit" default="test" basedir="."> - - <!-- allow properties to be overridden in a properties file --> - <property file="build.properties"/> - - <!-- Version --> - <property name="xmlunit.version" value="1.4alpha"/> - - <!-- some locations --> - <property name="src.dir" value="src"/> - <property name="test.dir" value="tests"/> - <property name="build.dir" location="build"/> - <property name="lib.dir" value="${build.dir}/lib"/> - <property name="out.dir" value="${build.dir}/classes"/> - <property name="test.out.dir" value="${build.dir}/test-classes"/> - <property name="userguide.out.dir" value="${build.dir}/ug-classes"/> - <property name="test.report.dir" value="${build.dir}/test-report"/> - <property name="dist.dir" value="${build.dir}/dist"/> - <property name="docs.dir" value="${build.dir}/doc"/> - <property name="userguide.docs.dir" value="${docs.dir}/userguide"/> - - <!-- javac properties --> - <property name="javac.source" value="1.3"/> - <property name="javac.target" value="1.3"/> - <property name="javac.debug" value="true"/> - - <!-- junit task properties --> - <property name="junit.fork" value="yes"/> - - <!-- some library paths --> - <!-- where is JAXP? property name="${xmlxsl.lib}" location="."/ --> - <!-- where is JUnit? property name="${junit.lib}" location="."/ --> - - <!-- Docbook related properties, macros and targets --> - <import file="docbook.xml"/> - - <target name="-props"> - <available property="jaxp13+" classname="javax.xml.xpath.XPath"/> - <condition property="jaxp13+.impl"> - <and> - <isset property="jaxp13+"/> - <available classname="java.net.Proxy"/> - </and> - </condition> - <available property="regexp.present" classname="java.util.regex.Matcher"/> - </target> - - <target name="-init" depends="-props"> - <mkdir dir="${lib.dir}"/> - <mkdir dir="${out.dir}"/> - <mkdir dir="${test.out.dir}"/> - <mkdir dir="${test.report.dir}"/> - <mkdir dir="${dist.dir}"/> - <mkdir dir="${docs.dir}"/> - <mkdir dir="${userguide.docs.dir}"/> - </target> - - <target name="clean" - description="removes created directories"> - <delete includeEmptyDirs="true" quiet="true"> - <fileset dir="${lib.dir}"/> - <fileset dir="${out.dir}"/> - <fileset dir="${test.out.dir}"/> - <fileset dir="${test.report.dir}"/> - <fileset dir="${dist.dir}"/> - <fileset dir="${docs.dir}"/> - <fileset dir="${userguide.docs.dir}"/> - <fileset dir="${build.dir}"/> - </delete> - </target> - - <target name="compile" depends="-init" - description="compiles sources and tests"> - <javac srcdir="${src.dir}/java" destdir="${out.dir}" - debug="${javac.debug}" target="${javac.target}" source="${javac.source}"> - <classpath> - <pathelement location="${xmlxsl.lib}"/> - <pathelement location="${junit.lib}"/> - <pathelement path="${java.class.path}"/> - </classpath> - <exclude name="**/jaxp13/**" unless="jaxp13+"/> - <exclude name="**/*XPathRegexAssert.java" unless="regexp.present"/> - </javac> - <javac srcdir="${test.dir}/java" destdir="${test.out.dir}" - debug="${javac.debug}" target="${javac.target}" source="${javac.source}"> - <classpath> - <pathelement location="${out.dir}"/> - <pathelement location="${xmlxsl.lib}"/> - <pathelement location="${junit.lib}"/> - <pathelement path="${java.class.path}"/> - </classpath> - <exclude name="**/jaxp13/**" unless="jaxp13+"/> - <exclude name="**/*XPathRegexAssert.java" unless="regexp.present"/> - </javac> - </target> - - <target name="test" depends="compile" - description="runs the tests"> - <junit printsummary="yes" haltonfailure="no" fork="${junit.fork}" - forkMode="perBatch" failureproperty="tests.failed"> - <sysproperty key="basedir" value="${basedir}"/> - <sysproperty key="user.dir" value="${basedir}"/> - <!-- - <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" - value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> - <sysproperty key="javax.xml.parsers.SAXParserFactory" - value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> - <sysproperty key="javax.xml.transform.TransformerFactory" - value="org.apache.xalan.processor.TransformerFactoryImpl"/> - --> - <classpath> - <pathelement location="${out.dir}"/> - <pathelement location="${test.out.dir}"/> - <pathelement location="${xmlxsl.lib}"/> - <pathelement location="${junit.lib}"/> - <pathelement path="${java.class.path}"/> - </classpath> - <formatter type="xml"/> - <batchtest todir="${test.report.dir}"> - <fileset dir="${test.dir}/java"> - <include name="**/test_*.java"/> - <exclude name="**/jaxp13/**" unless="jaxp13+.impl"/> - </fileset> - </batchtest> - </junit> - - <junitreport todir="${test.report.dir}"> - <fileset dir="${test.report.dir}"> - <include name="TEST-*.xml"/> - </fileset> - <report format="frames" todir="${test.report.dir}/html"/> - </junitreport> - - <fail if="tests.failed">Some tests failed</fail> - </target> - - <target name="docs" - depends="create-users-guide,javadocs,-site" - description="creates the documentation bundle"/> - - <target name="javadocs" depends="-init" - description="creates the API documentation"> - <delete includeEmptyDirs="true" dir="${docs.dir}/api"/> - <javadoc destdir="${docs.dir}/api" - overview="${src.dir}/java/overview.html" - windowtitle="XMLUnit Documentation" - footer="<p><a href="http://xmlunit.sourceforge.net/">XMLUnit</a> is hosted by sourceforge.net</p>"> - <group title="XMLUnit v${xmlunit.version}" - packages="org.custommonkey.xmlunit*"/> - <fileset dir="${src.dir}/java"> - <include name="org/custommonkey/**/*.java"/> - </fileset> - <classpath> - <fileset dir="${lib.dir}"> - <include name="*.jar"/> - </fileset> - <pathelement path="${java.class.path}"/> - </classpath> - </javadoc> - </target> - - <target name="-site" depends="-init"> - <copy todir="${docs.dir}"> - <fileset dir="${src.dir}/site"> - <include name="*.html"/> - <include name="*.png"/> - </fileset> - </copy> - </target> - - <target name="jar" depends="compile" - description="creates jar, Maven2 POM and Ivy file"> - <jar jarfile="${lib.dir}/xmlunit-${xmlunit.version}.jar" - basedir="${out.dir}" - /> - - <tstamp> - <format property="ivy.publication.datetime" pattern="yyyyMMddHHmmss"/> - </tstamp> - - <copy todir="${lib.dir}"> - <fileset dir="${src.dir}/etc"> - <include name="xmlunit.pom"/> - <include name="xmlunit-ivy.xml"/> - <include name="xmlunit-maven-metadata.xml"/> - </fileset> - <mapper type="glob" from="xmlunit*" to="xmlunit-${xmlunit.version}*"/> - <filterset> - <filter token="VERSION" value="${xmlunit.version}"/> - <filter token="DATE" value="${ivy.publication.datetime}"/> - <filter token="DESCRIPTION" value="XMLUnit compares a control XML document to a test document or the result of a transformation, validates documents, and compares the results of XPath expressions."/> - <filter token="LICENSE" value="BSD License"/> - <filter token="LICENSE_URL" value="http://xmlunit.svn.sourceforge.net/viewvc/*checkout*/xmlunit/trunk/xmlunit/LICENSE.txt"/> - <filter token="GROUP" value="xmlunit"/> - <filter token="ARTIFACT" value="xmlunit"/> - <filter token="TYPE" value="jar"/> - </filterset> - </copy> - </target> - - <target name="Gump" depends="test,jar"/> - - <target name="bindist" depends="jar,test,docs"> - <zip zipfile="${dist.dir}/xmlunit-${xmlunit.version}-bin.zip"> - <zipfileset prefix="xmlunit-${xmlunit.version}/lib" - dir="${lib.dir}"/> - <zipfileset prefix="xmlunit-${xmlunit.version}/docs" - dir="${docs.dir}"/> - <zipfileset prefix="xmlunit-${xmlunit.version}" dir="."> - <include name="KEYS"/> - <include name="LICENSE.txt"/> - <include name="README.txt"/> - </zipfileset> - </zip> - </target> - - <target name="srcdist" depends="-init,create-users-guide"> - <zip zipfile="${dist.dir}/xmlunit-${xmlunit.version}-src.zip"> - <zipfileset prefix="xmlunit-${xmlunit.version}" dir="."> - <include name="*.xml"/> - <include name="${src.dir}/"/> - <include name="${test.dir}/"/> - <include name="KEYS"/> - <include name="LICENSE.txt"/> - <include name="README.txt"/> - <exclude name="**/csharp/**"/> - </zipfileset> - <zipfileset dir="${userguide.docs.dir}" - prefix="xmlunit-${xmlunit.version}/userguide"/> - </zip> - </target> - - <target name="dist" - depends="bindist,srcdist,compile-userguide-examples" - description="creates the distribution files"> - <checksum algorithm="md5"> - <fileset dir="${dist.dir}"> - <include name="*.zip"/> - </fileset> - </checksum> - <checksum algorithm="sha1"> - <fileset dir="${dist.dir}"> - <include name="*.zip"/> - </fileset> - </checksum> - </target> - - <target name="compile-userguide-examples" depends="compile"> - <mkdir dir="${userguide.out.dir}"/> - <javac srcdir="src/user-guide" includes="org/" - destdir="${userguide.out.dir}" source="1.3" target="1.2"> - <classpath> - <pathelement location="${junit.lib}"/> - <pathelement location="${out.dir}"/> - </classpath> - </javac> - <delete dir="${userguide.out.dir}"/> - </target> -</project> Copied: tags/XMLUnit-Java-1.4/build.xml (from rev 518, branches/xmlunit-1.x/build.xml) =================================================================== --- tags/XMLUnit-Java-1.4/build.xml (rev 0) +++ tags/XMLUnit-Java-1.4/build.xml 2013-02-07 05:31:14 UTC (rev 519) @@ -0,0 +1,292 @@ +<?xml version="1.0"?> +<!-- +Copyright (c) 2001-2013, Jeff Martin, Tim Bacon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +--> +<project name="xmlunit" default="test" basedir="."> + + <!-- allow properties to be overridden in a properties file --> + <property file="build.properties"/> + + <!-- Version --> + <property name="xmlunit.version" value="1.4"/> + + <!-- some locations --> + <property name="src.dir" value="src"/> + <property name="test.dir" value="tests"/> + <property name="build.dir" location="build"/> + <property name="lib.dir" value="${build.dir}/lib"/> + <property name="out.dir" value="${build.dir}/classes"/> + <property name="test.out.dir" value="${build.dir}/test-classes"/> + <property name="userguide.out.dir" value="${build.dir}/ug-classes"/> + <property name="test.report.dir" value="${build.dir}/test-report"/> + <property name="dist.dir" value="${build.dir}/dist"/> + <property name="docs.dir" value="${build.dir}/doc"/> + <property name="userguide.docs.dir" value="${docs.dir}/userguide"/> + + <!-- javac properties --> + <property name="javac.source" value="1.3"/> + <property name="javac.target" value="1.3"/> + <property name="javac.debug" value="true"/> + + <!-- junit task properties --> + <property name="junit.fork" value="yes"/> + + <!-- some library paths --> + <!-- where is JAXP? property name="${xmlxsl.lib}" location="."/ --> + <!-- where is JUnit? property name="${junit.lib}" location="."/ --> + + <!-- Docbook related properties, macros and targets --> + <import file="docbook.xml"/> + + <target name="-props"> + <available property="jaxp13+" classname="javax.xml.xpath.XPath"/> + <condition property="jaxp13+.impl"> + <and> + <isset property="jaxp13+"/> + <available classname="java.net.Proxy"/> + </and> + </condition> + <available property="regexp.present" classname="java.util.regex.Matcher"/> + </target> + + <target name="-init" depends="-props"> + <mkdir dir="${lib.dir}"/> + <mkdir dir="${out.dir}"/> + <mkdir dir="${test.out.dir}"/> + <mkdir dir="${test.report.dir}"/> + <mkdir dir="${dist.dir}"/> + <mkdir dir="${docs.dir}"/> + <mkdir dir="${userguide.docs.dir}"/> + </target> + + <target name="clean" + description="removes created directories"> + <delete includeEmptyDirs="true" quiet="true"> + <fileset dir="${lib.dir}"/> + <fileset dir="${out.dir}"/> + <fileset dir="${test.out.dir}"/> + <fileset dir="${test.report.dir}"/> + <fileset dir="${dist.dir}"/> + <fileset dir="${docs.dir}"/> + <fileset dir="${userguide.docs.dir}"/> + <fileset dir="${build.dir}"/> + </delete> + </target> + + <target name="compile" depends="-init" + description="compiles sources and tests"> + <javac srcdir="${src.dir}/java" destdir="${out.dir}" + debug="${javac.debug}" target="${javac.target}" source="${javac.source}"> + <classpath> + <pathelement location="${xmlxsl.lib}"/> + <pathelement location="${junit.lib}"/> + <pathelement path="${java.class.path}"/> + </classpath> + <exclude name="**/jaxp13/**" unless="jaxp13+"/> + <exclude name="**/*XPathRegexAssert.java" unless="regexp.present"/> + </javac> + <javac srcdir="${test.dir}/java" destdir="${test.out.dir}" + debug="${javac.debug}" target="${javac.target}" source="${javac.source}"> + <classpath> + <pathelement location="${out.dir}"/> + <pathelement location="${xmlxsl.lib}"/> + <pathelement location="${junit.lib}"/> + <pathelement path="${java.class.path}"/> + </classpath> + <exclude name="**/jaxp13/**" unless="jaxp13+"/> + <exclude name="**/*XPathRegexAssert.java" unless="regexp.present"/> + </javac> + </target> + + <target name="test" depends="compile" + description="runs the tests"> + <junit printsummary="yes" haltonfailure="no" fork="${junit.fork}" + forkMode="perBatch" failureproperty="tests.failed"> + <sysproperty key="basedir" value="${basedir}"/> + <sysproperty key="user.dir" value="${basedir}"/> + <!-- + <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" + value="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> + <sysproperty key="javax.xml.parsers.SAXParserFactory" + value="org.apache.xerces.jaxp.SAXParserFactoryImpl"/> + <sysproperty key="javax.xml.transform.TransformerFactory" + value="org.apache.xalan.processor.TransformerFactoryImpl"/> + --> + <classpath> + <pathelement location="${out.dir}"/> + <pathelement location="${test.out.dir}"/> + <pathelement location="${xmlxsl.lib}"/> + <pathelement location="${junit.lib}"/> + <pathelement path="${java.class.path}"/> + </classpath> + <formatter type="xml"/> + <batchtest todir="${test.report.dir}"> + <fileset dir="${test.dir}/java"> + <include name="**/test_*.java"/> + <exclude name="**/jaxp13/**" unless="jaxp13+.impl"/> + </fileset> + </batchtest> + </junit> + + <junitreport todir="${test.report.dir}"> + <fileset dir="${test.report.dir}"> + <include name="TEST-*.xml"/> + </fileset> + <report format="frames" todir="${test.report.dir}/html"/> + </junitreport> + + <fail if="tests.failed">Some tests failed</fail> + </target> + + <target name="docs" + depends="create-users-guide,javadocs,-site" + description="creates the documentation bundle"/> + + <target name="javadocs" depends="-init" + description="creates the API documentation"> + <delete includeEmptyDirs="true" dir="${docs.dir}/api"/> + <javadoc destdir="${docs.dir}/api" + overview="${src.dir}/java/overview.html" + windowtitle="XMLUnit Documentation" + footer="<p><a href="http://xmlunit.sourceforge.net/">XMLUnit</a> is hosted by sourceforge.net</p>"> + <group title="XMLUnit v${xmlunit.version}" + packages="org.custommonkey.xmlunit*"/> + <fileset dir="${src.dir}/java"> + <include name="org/custommonkey/**/*.java"/> + </fileset> + <classpath> + <fileset dir="${lib.dir}"> + <include name="*.jar"/> + </fileset> + <pathelement path="${java.class.path}"/> + </classpath> + </javadoc> + </target> + + <target name="-site" depends="-init"> + <copy todir="${docs.dir}"> + <fileset dir="${src.dir}/site"> + <include name="*.html"/> + <include name="*.png"/> + </fileset> + </copy> + </target> + + <target name="jar" depends="compile" + description="creates jar, Maven2 POM and Ivy file"> + <jar jarfile="${lib.dir}/xmlunit-${xmlunit.version}.jar" + basedir="${out.dir}" + /> + + <tstamp> + <format property="ivy.publication.datetime" pattern="yyyyMMddHHmmss"/> + </tstamp> + + <copy todir="${lib.dir}"> + <fileset dir="${src.dir}/etc"> + <include name="xmlunit.pom"/> + <include name="xmlunit-ivy.xml"/> + <include name="xmlunit-maven-metadata.xml"/> + </fileset> + <mapper type="glob" from="xmlunit*" to="xmlunit-${xmlunit.version}*"/> + <filterset> + <filter token="VERSION" value="${xmlunit.version}"/> + <filter token="DATE" value="${ivy.publication.datetime}"/> + <filter token="DESCRIPTION" value="XMLUnit compares a control XML document to a test document or the result of a transformation, validates documents, and compares the results of XPath expressions."/> + <filter token="LICENSE" value="BSD License"/> + <filter token="LICENSE_URL" value="http://xmlunit.svn.sourceforge.net/viewvc/*checkout*/xmlunit/trunk/xmlunit/LICENSE.txt"/> + <filter token="GROUP" value="xmlunit"/> + <filter token="ARTIFACT" value="xmlunit"/> + <filter token="TYPE" value="jar"/> + </filterset> + </copy> + </target> + + <target name="Gump" depends="test,jar"/> + + <target name="bindist" depends="jar,test,docs"> + <zip zipfile="${dist.dir}/xmlunit-${xmlunit.version}-bin.zip"> + <zipfileset prefix="xmlunit-${xmlunit.version}/lib" + dir="${lib.dir}"/> + <zipfileset prefix="xmlunit-${xmlunit.version}/docs" + dir="${docs.dir}"/> + <zipfileset prefix="xmlunit-${xmlunit.version}" dir="."> + <include name="KEYS"/> + <include name="LICENSE.txt"/> + <include name="README.txt"/> + </zipfileset> + </zip> + </target> + + <target name="srcdist" depends="-init,create-users-guide"> + <zip zipfile="${dist.dir}/xmlunit-${xmlunit.version}-src.zip"> + <zipfileset prefix="xmlunit-${xmlunit.version}" dir="."> + <include name="*.xml"/> + <include name="${src.dir}/"/> + <include name="${test.dir}/"/> + <include name="KEYS"/> + <include name="LICENSE.txt"/> + <include name="README.txt"/> + <exclude name="**/csharp/**"/> + </zipfileset> + <zipfileset dir="${userguide.docs.dir}" + prefix="xmlunit-${xmlunit.version}/userguide"/> + </zip> + </target> + + <target name="dist" + depends="bindist,srcdist,compile-userguide-examples" + description="creates the distribution files"> + <checksum algorithm="md5"> + <fileset dir="${dist.dir}"> + <include name="*.zip"/> + </fileset> + </checksum> + <checksum algorithm="sha1"> + <fileset dir="${dist.dir}"> + <include name="*.zip"/> + </fileset> + </checksum> + </target> + + <target name="compile-userguide-examples" depends="compile"> + <mkdir dir="${userguide.out.dir}"/> + <javac srcdir="src/user-guide" includes="org/" + destdir="${userguide.out.dir}" source="1.3" target="1.2"> + <classpath> + <pathelement location="${junit.lib}"/> + <pathelement location="${out.dir}"/> + </classpath> + </javac> + <delete dir="${userguide.out.dir}"/> + </target> +</project> Deleted: tags/XMLUnit-Java-1.4/src/etc/xmlunit-ivy.xml =================================================================== --- branches/xmlunit-1.x/src/etc/xmlunit-ivy.xml 2013-02-03 15:05:33 UTC (rev 517) +++ tags/XMLUnit-Java-1.4/src/etc/xmlunit-ivy.xml 2013-02-07 05:31:14 UTC (rev 519) @@ -1,46 +0,0 @@ -<?xml version="1.0"?> -<!-- -Copyright (c) 2007-2008, Jeff Martin, Tim Bacon -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of the xmlunit.sourceforge.net nor the names - of its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ---> -<ivy-module version="1.3"> - <info organisation="@GROUP@" - module="@ARTIFACT@" - revision="@VERSION@" - publication="@DATE@"> - <license name="@LICENSE@" - url="@LICENSE_URL@"/> - <description homepage="http://xmlunit.sourceforge.net/">@DESCRIPTION@</description> - </info> - <publications> - <artifact name="@ARTIFACT@" type="@TYPE@"/> - </publications> -</ivy-module> Copied: tags/XMLUnit-Java-1.4/src/etc/xmlunit-ivy.xml (from rev 518, branches/xmlunit-1.x/src/etc/xmlunit-ivy.xml) =================================================================== --- tags/XMLUnit-Java-1.4/src/etc/xmlunit-ivy.xml (rev 0) +++ tags/XMLUnit-Java-1.4/src/etc/xmlunit-ivy.xml 2013-02-07 05:31:14 UTC (rev 519) @@ -0,0 +1,46 @@ +<?xml version="1.0"?> +<!-- +Copyright (c) 2007-2013, Jeff Martin, Tim Bacon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +--> +<ivy-module version="1.3"> + <info organisation="@GROUP@" + module="@ARTIFACT@" + revision="@VERSION@" + publication="@DATE@"> + <license name="@LICENSE@" + url="@LICENSE_URL@"/> + <description homepage="http://xmlunit.sourceforge.net/">@DESCRIPTION@</description> + </info> + <publications> + <artifact name="@ARTIFACT@" type="@TYPE@"/> + </publications> +</ivy-module> Deleted: tags/XMLUnit-Java-1.4/src/etc/xmlunit-maven-metadata.xml =================================================================== --- branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml 2013-02-03 15:05:33 UTC (rev 517) +++ tags/XMLUnit-Java-1.4/src/etc/xmlunit-maven-metadata.xml 2013-02-07 05:31:14 UTC (rev 519) @@ -1,47 +0,0 @@ -<?xml version="1.0"?> -<!-- -Copyright (c) 2007-2008, Jeff Martin, Tim Bacon -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of the xmlunit.sourceforge.net nor the names - of its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ---> -<metadata> - <groupId>@GROUP@</groupId> - <artifactId>@ARTIFACT@</artifactId> - <version>@VERSION@</version> - <versioning> - <versions> - <version>0.8</version> - <version>1.0</version> - <version>1.1</version> - <version>1.2</version> - <version>@VERSION@</version> - </versions> - </versioning> -</metadata> Copied: tags/XMLUnit-Java-1.4/src/etc/xmlunit-maven-metadata.xml (from rev 518, branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml) =================================================================== --- tags/XMLUnit-Java-1.4/src/etc/xmlunit-maven-metadata.xml (rev 0) +++ tags/XMLUnit-Java-1.4/src/etc/xmlunit-maven-metadata.xml 2013-02-07 05:31:14 UTC (rev 519) @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- +Copyright (c) 2007-2013, Jeff Martin, Tim Bacon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +--> +<metadata> + <groupId>@GROUP@</groupId> + <artifactId>@ARTIFACT@</artifactId> + <version>@VERSION@</version> + <versioning> + <versions> + <version>0.8</version> + <version>1.0</version> + <version>1.1</version> + <version>1.2</version> + <version>1.3</version> + <version>@VERSION@</version> + </versions> + </versioning> +</metadata> Deleted: tags/XMLUnit-Java-1.4/src/etc/xmlunit.pom =================================================================== --- branches/xmlunit-1.x/src/etc/xmlunit.pom 2013-02-03 15:05:33 UTC (rev 517) +++ tags/XMLUnit-Java-1.4/src/etc/xmlunit.pom 2013-02-07 05:31:14 UTC (rev 519) @@ -1,68 +0,0 @@ -<?xml version="1.0"?> -<!-- -Copyright (c) 2007-2008, Jeff Martin, Tim Bacon -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of the xmlunit.sourceforge.net nor the names - of its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. ---> - -<!-- - - This POM is not usable as means to build XMLUnit with Maven2, it is - a minimal POM to allow XMLUnit's artifacts to be added to a Maven - repository. - ---> -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>@GROUP@</groupId> - <artifactId>@ARTIFACT@</artifactId> - <packaging>@TYPE@</packaging> - <name>XMLUnit for Java</name> - <version>@VERSION@</version> - <url>http://xmlunit.sourceforge.net/</url> - <description>@DESCRIPTION@</description> - <licenses> - <license> - <name>@LICENSE@</name> - <url>@LICENSE_URL@</url> - </license> - </licenses> - <scm> - <url>http://xmlunit.svn.sourceforge.net/viewvc/xmlunit/</url> - </scm> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.2</version> - <optional>true</optional> - </dependency> - </dependencies> -</project> Copied: tags/XMLUnit-Java-1.4/src/etc/xmlunit.pom (from rev 518, branches/xmlunit-1.x/src/etc/xmlunit.pom) =================================================================== --- tags/XMLUnit-Java-1.4/src/etc/xmlunit.pom (rev 0) +++ tags/XMLUnit-Java-1.4/src/etc/xmlunit.pom 2013-02-07 05:31:14 UTC (rev 519) @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<!-- +Copyright (c) 2007-2013, Jeff Martin, Tim Bacon +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of the xmlunit.sourceforge.net nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +--> + +<!-- + + This POM is not usable as means to build XMLUnit with Maven2, it is + a minimal POM to allow XMLUnit's artifacts to be added to a Maven + repository. + +--> +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>@GROUP@</groupId> + <artifactId>@ARTIFACT@</artifactId> + <packaging>@TYPE@</packaging> + <name>XMLUnit for Java</name> + <version>@VERSION@</version> + <url>http://xmlunit.sourceforge.net/</url> + <description>@DESCRIPTION@</description> + <licenses> + <license> + <name>@LICENSE@</name> + <url>@LICENSE_URL@</url> + </license> + </licenses> + <scm> + <url>http://xmlunit.svn.sourceforge.net/viewvc/xmlunit/</url> + </scm> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>3.8.2</version> + <optional>true</optional> + </dependency> + </dependencies> +</project> Deleted: tags/XMLUnit-Java-1.4/src/site/index.html =================================================================== --- branches/xmlunit-1.x/src/site/index.html 2013-02-03 15:05:33 UTC (rev 517) +++ tags/XMLUnit-Java-1.4/src/site/index.html 2013-02-07 05:31:14 UTC (rev 519) @@ -1,143 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title><XmlUnit/></title> - <meta http-equiv="content-type" - content="text/html; charset=ISO-8859-1"> - <meta name="keywords" - content="unit testing, test driven development, xml, xmlunit, junit, nunit"> - <style type="text/css"> - body{font-family: Helvetica, Arial, sans-serif} - code{font-style: italic} - </style> -</head> -<body> -<table width="100%" height="100%" border="0"> - <tbody> - <tr> - <td colspan="2"><img align="left" src="xmlunit.png" - alt="<xml-unit/>" width="331" height="100"> <a href="http://sourceforge.net/projects/xmlunit"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=23187&type=13" width="120" height="30" border="0" alt="Get XML Unit at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a><br> - <h1>XMLUnit - JUnit and NUnit testing for XML</h1> - </td> - </tr> - <tr> - <td valign="top" colspan="2"> - <p>For those of you who've got into it you'll know that test -driven development is great. It gives you the confidence to change code -safe in the knowledge that if something breaks you'll know about it. -Except for those bits you don't know how to test. Until now XML has -been one of them. Oh sure you can use <code><b>"<stuff></stuff>"</b>.equals(<b>"<stuff></stuff>"</b>);</code> -but is that really gonna work when some joker decides to output a <code><b><stuff/></b></code>? --- damned right it's not ;-)</p> - <p>XML can be used for just about anything so deciding if two -documents are equal to each other isn't as easy as a character for -character match. Sometimes</p> - <table bgcolor="black"> - <tbody> - <tr> - <td bgcolor="white"> - <pre><stuff-doc><br> <stuff><br> Stuff Stuff Stuff<br> </stuff><br> <more-stuff><br> Some More Stuff<br> </more-stuff><br></stuff-doc> </pre> - </td> - <td bgcolor="white">equals</td> - <td bgcolor="white"> - <pre><stuff-doc><br> <more-stuff><br> Some More Stuff</more-stuff><br> <stuff>Stuff Stuff Stuff</stuff><br></stuff-doc> </pre> - </td> - </tr> - </tbody> - </table> - <p>and sometimes it doesn't... With XMLUnit you get the control, -and you get to decide.</p> - </td> - </tr> - <tr> - <td> - <h2>XMLUnit for Java</h2> - </td> - <td width="240"> <a href="http://www.junit.org/"><img - src="http://www.junit.org/images/junitlogo.gif" alt="JUnit.org" - border="0"></a> </td> - </tr> - <tr> - <td colspan="2"> - <p>The current stable release is <a - href="http://sourceforge.net/project/showfiles.php?group_id=23187&package_id=15921&release_id=605991">XMLUnit - 1.2</a>, June 2008.</p> - <p>XMLUnit for Java provides two JUnit extension classes, <code>XMLAssert</code> -and <code>XMLTestCase</code>, -and a set of supporting classes (e.g. <code>Diff</code>, <code>DetailedDiff</code>,<code>Transform</code>,<code>SimpleXpathEngine</code>,<code>Validator</code>,<code>NodeTest</code>) -that allow assertions to be made about:</p> - <ul> - <li>The differences between two pieces of XML</li> - <li>The outcome of transforming a piece of XML using XSLT</li> - <li>The evaluation of an XPath expression on a piece of XML</li> - <li>The validity of a piece of XML</li> - <li>Individual nodes in a piece of XML that are exposed by DOM -Traversal</li> - </ul> - <p>XMLUnit for Java can also treat HTML content (even -badly-formed HTML) as valid XML to allow these assertions to be made -about the content of web pages too.</p> - <table border="0" cellspacing="5" cellpadding="5"> - <tbody> - <tr> - <td>Read the User's Guide (<a - href="userguide/XMLUnit-Java.pdf">PDF</a> or <a - href="userguide/html/index.html">HTML</a>)</td> - <td><a href="example.html">See some example code</a></td> - <td><a href="api/index.html">Browse the Javadocs</a></td> - <td><a - href="http://xmlunit.svn.sourceforge.net/viewvc/xmlunit/trunk/xmlunit/">Visit -the Subversion repository</a> </td> - </tr> - </tbody> - </table> - </td> - </tr> - <tr> - <td> - <h2>XMLUnit for .Net</h2> - </td> - <td width="240"> <a - href="http://nunit.org/"><img src="http://nunit.org/img/logo.gif" - alt="NUnit.org" border="0"></a> </td> - </tr> - <tr> - <td colspan="2"> - <p>The current release is <a - href="https://sourceforge.net/project/showfiles.php?group_id=23187&package_id=91308">XmlUnit -.Net 0.3.1</a>, February 2008</p> - <p>XMLUnit for .Net provides NUnit extension classes written in -C#, e.g. <code>XmlAssertion</code> and <code>XmlDiff</code>, that allow -assertions to be made about the differences between two pieces of XML, -the validity of a piece of XML, the evaluation of an XPath expression -on a piece of XML, and the result of an XSL Transform.<br> - </p> - <p>Please be aware that the .Net code base is not as advanced as its Java -counterpart, in particular there is currently no explicit support for namespaces.</p> - </td> - </tr> - <tr> - <td colspan="2"> - <h2>News</h2> - <p> RSS feeds are available for <a - href="http://sourceforge.net/export/rss2_projnews.php?group_id=23187&rss_fulltext=1&go"><img - src="https://images.sourceforge.net/images/xml.png" border="0" - alt="RSS feed">Project news releases</a> and <a - href="http://sourceforge.net/export/rss2_projfiles.php?group_id=23187&go"><img - src="https://images.sourceforge.net/images/xml.png" border="0" - alt="RSS feed">Project file releases</a> .</p> - <p> An archive of the project news is available <a - href="http://sourceforge.net/news/?group_id=23187">here</a>. </p> - </td> - </tr> - <tr> - <td valign="bottom" align="right" colspan="2"> - <p style="font-size: smaller;">Brought to you by <a - href="http://coachspot.blogspot.com/">Tim Bacon</a> and <a - href="http://www.custommonkey.org/">Jeff Martin</a></p> - </td> - </tr> - </tbody> -</table> -</body> -</html> Copied: tags/XMLUnit-Java-1.4/src/site/index.html (from rev 518, branches/xmlunit-1.x/src/site/index.html) =================================================================== --- tags/XMLUnit-Java-1.4/src/site/index.html (rev 0) +++ tags/XMLUnit-Java-1.4/src/site/index.html 2013-02-07 05:31:14 UTC (rev 519) @@ -0,0 +1,141 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <title><XmlUnit/></title> + <meta http-equiv="content-type" + content="text/html; charset=ISO-8859-1"> + <meta name="keywords" + content="unit testing, test driven development, xml, xmlunit, junit, nunit"> + <style type="text/css"> + body{font-family: Helvetica, Arial, sans-serif} + code{font-style: italic} + </style> +</head> +<body> +<table width="100%" height="100%" border="0"> + <tbody> + <tr> + <td colspan="2"><img align="left" src="xmlunit.png" + alt="<xml-unit/>" width="331" height="100"> <a href="http://sourceforge.net/projects/xmlunit"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=23187&type=13" width="120" height="30" border="0" alt="Get XML Unit at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a><br> + <h1>XMLUnit - JUnit and NUnit testing for XML</h1> + </td> + </tr> + <tr> + <td valign="top" colspan="2"> + <p>For those of you who've got into it you'll know that test +driven development is great. It gives you the confidence to change code +safe in the knowledge that if something breaks you'll know about it. +Except for those bits you don't know how to test. Until now XML has +been one of them. Oh sure you can use <code><b>"<stuff></stuff>"</b>.equals(<b>"<stuff></stuff>"</b>);</code> +but is that really gonna work when some joker decides to output a <code><b><stuff/></b></code>? +-- damned right it's not ;-)</p> + <p>XML can be used for just about anything so deciding if two +documents are equal to each other isn't as easy as a character for +character match. Sometimes</p> + <table bgcolor="black"> + <tbody> + <tr> + <td bgcolor="white"> + <pre><stuff-doc><br> <stuff><br> Stuff Stuff Stuff<br> </stuff><br> <more-stuff><br> Some More Stuff<br> </more-stuff><br></stuff-doc> </pre> + </td> + <td bgcolor="white">equals</td> + <td bgcolor="white"> + <pre><stuff-doc><br> <more-stuff><br> Some More Stuff</more-stuff><br> <stuff>Stuff Stuff Stuff</stuff><br></stuff-doc> </pre> + </td> + </tr> + </tbody> + </table> + <p>and sometimes it doesn't... With XMLUnit you get the control, +and you get to decide.</p> + </td> + </tr> + <tr> + <td> + <h2>XMLUnit for Java</h2> + </td> + <td width="240"> <a href="http://www.junit.org/"><img + src="http://www.junit.org/images/junitlogo.gif" alt="JUnit.org" + border="0"></a> </td> + </tr> + <tr> + <td colspan="2"> + <p>The current stable release is XMLUnit 1.4, February 2013.</p> + <p>XMLUnit for Java provides two JUnit extension classes, <code>XMLAssert</code> +and <code>XMLTestCase</code>, +and a set of supporting classes (e.g. <code>Diff</code>, <code>DetailedDiff</code>,<code>Transform</code>,<code>SimpleXpathEngine</code>,<code>Validator</code>,<code>NodeTest</code>) +that allow assertions to be made about:</p> + <ul> + <li>The differences between two pieces of XML</li> + <li>The outcome of transforming a piece of XML using XSLT</li> + <li>The evaluation of an XPath expression on a piece of XML</li> + <li>The validity of a piece of XML</li> + <li>Individual nodes in a piece of XML that are exposed by DOM +Traversal</li> + </ul> + <p>XMLUnit for Java can also treat HTML content (even +badly-formed HTML) as valid XML to allow these assertions to be made +about the content of web pages too.</p> + <table border="0" cellspacing="5" cellpadding="5"> + <tbody> + <tr> + <td>Read the User's Guide (<a + href="userguide/XMLUnit-Java.pdf">PDF</a> or <a + href="userguide/html/index.html">HTML</a>)</td> + <td><a href="example.html">See some example code</a></td> + <td><a href="api/index.html">Browse the Javadocs</a></td> + <td><a + href="http://xmlunit.svn.sourceforge.net/viewvc/xmlunit/trunk/xmlunit/">Visit +the Subversion repository</a> </td> + </tr> + </tbody> + </table> + </td> + </tr> + <tr> + <td> + <h2>XMLUnit for .Net</h2> + </td> + <td width="240"> <a + href="http://nunit.org/"><img src="http://nunit.org/img/logo.gif" + alt="NUnit.org" border="0"></a> </td> + </tr> + <tr> + <td colspan="2"> + <p>The current release is <a + href="https://sourceforge.net/projects/xmlunit/files/xmlunit%20for%20.Net/XMLUnit%20for%20.NET%200.4/">XmlUnit +.Net 0.4</a>, April 2009</p> + <p>XMLUnit for .Net provides NUnit extension classes written in +C#, e.g. <code>XmlAssertion</code> and <code>XmlDiff</code>, that allow +assertions to be made about the differences between two pieces of XML, +the validity of a piece of XML, the evaluation of an XPath expression +on a piece of XML, and the result of an XSL Transform.<br> + </p> + <p>Please be aware that the .Net code base is not as advanced as its Java +counterpart, in particular there is currently no explicit support for namespaces.</p> + </td> + </tr> + <tr> + <td colspan="2"> + <h2>News</h2> + <p> RSS feeds are available for <a + href="http://sourceforge.net/export/rss2_projnews.php?group_id=23187&rss_fulltext=1&go"><img + src="https://images.sourceforge.net/images/xml.png" border="0" + alt="RSS feed">Project news releases</a> and <a + href="http://sourceforge.net/export/rss2_projfiles.php?group_id=23187&go"><img + src="https://images.sourceforge.net/images/xml.png" border="0" + alt="RSS feed">Project file releases</a> .</p> + <p> An archive of the project news is available <a + href="http://sourceforge.net/news/?group_id=23187">here</a>. </p> + </td> + </tr> + <tr> + <td valign="bottom" align="right" colspan="2"> + <p style="font-size: smaller;">Brought to you by <a + href="http://coachspot.blogspot.com/">Tim Bacon</a> and <a + href="http://www.custommonkey.org/">Jeff Martin</a></p> + </td> + </tr> + </tbody> +</table> +</body> +</html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-02-07 05:24:53
|
Revision: 518 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=518&view=rev Author: bodewig Date: 2013-02-07 05:24:43 +0000 (Thu, 07 Feb 2013) Log Message: ----------- prepare for 1.4 release Modified Paths: -------------- branches/xmlunit-1.x/LICENSE.txt branches/xmlunit-1.x/build.xml branches/xmlunit-1.x/src/etc/xmlunit-ivy.xml branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml branches/xmlunit-1.x/src/etc/xmlunit.pom branches/xmlunit-1.x/src/site/index.html Modified: branches/xmlunit-1.x/LICENSE.txt =================================================================== --- branches/xmlunit-1.x/LICENSE.txt 2013-02-03 15:05:33 UTC (rev 517) +++ branches/xmlunit-1.x/LICENSE.txt 2013-02-07 05:24:43 UTC (rev 518) @@ -1,6 +1,6 @@ /* ****************************************************************** -Copyright (c) 2001-2009, Jeff Martin, Tim Bacon +Copyright (c) 2001-2013, Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without Modified: branches/xmlunit-1.x/build.xml =================================================================== --- branches/xmlunit-1.x/build.xml 2013-02-03 15:05:33 UTC (rev 517) +++ branches/xmlunit-1.x/build.xml 2013-02-07 05:24:43 UTC (rev 518) @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- -Copyright (c) 2001-2008, Jeff Martin, Tim Bacon +Copyright (c) 2001-2013, Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without Modified: branches/xmlunit-1.x/src/etc/xmlunit-ivy.xml =================================================================== --- branches/xmlunit-1.x/src/etc/xmlunit-ivy.xml 2013-02-03 15:05:33 UTC (rev 517) +++ branches/xmlunit-1.x/src/etc/xmlunit-ivy.xml 2013-02-07 05:24:43 UTC (rev 518) @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- -Copyright (c) 2007-2008, Jeff Martin, Tim Bacon +Copyright (c) 2007-2013, Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without Modified: branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml =================================================================== --- branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml 2013-02-03 15:05:33 UTC (rev 517) +++ branches/xmlunit-1.x/src/etc/xmlunit-maven-metadata.xml 2013-02-07 05:24:43 UTC (rev 518) @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- -Copyright (c) 2007-2008, Jeff Martin, Tim Bacon +Copyright (c) 2007-2013, Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41,6 +41,7 @@ <version>1.0</version> <version>1.1</version> <version>1.2</version> + <version>1.3</version> <version>@VERSION@</version> </versions> </versioning> Modified: branches/xmlunit-1.x/src/etc/xmlunit.pom =================================================================== --- branches/xmlunit-1.x/src/etc/xmlunit.pom 2013-02-03 15:05:33 UTC (rev 517) +++ branches/xmlunit-1.x/src/etc/xmlunit.pom 2013-02-07 05:24:43 UTC (rev 518) @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!-- -Copyright (c) 2007-2008, Jeff Martin, Tim Bacon +Copyright (c) 2007-2013, Jeff Martin, Tim Bacon All rights reserved. Redistribution and use in source and binary forms, with or without Modified: branches/xmlunit-1.x/src/site/index.html =================================================================== --- branches/xmlunit-1.x/src/site/index.html 2013-02-03 15:05:33 UTC (rev 517) +++ branches/xmlunit-1.x/src/site/index.html 2013-02-07 05:24:43 UTC (rev 518) @@ -59,9 +59,7 @@ </tr> <tr> <td colspan="2"> - <p>The current stable release is <a - href="http://sourceforge.net/project/showfiles.php?group_id=23187&package_id=15921&release_id=605991">XMLUnit - 1.2</a>, June 2008.</p> + <p>The current stable release is XMLUnit 1.4, February 2013.</p> <p>XMLUnit for Java provides two JUnit extension classes, <code>XMLAssert</code> and <code>XMLTestCase</code>, and a set of supporting classes (e.g. <code>Diff</code>, <code>DetailedDiff</code>,<code>Transform</code>,<code>SimpleXpathEngine</code>,<code>Validator</code>,<code>NodeTest</code>) @@ -104,8 +102,8 @@ <tr> <td colspan="2"> <p>The current release is <a - href="https://sourceforge.net/project/showfiles.php?group_id=23187&package_id=91308">XmlUnit -.Net 0.3.1</a>, February 2008</p> + href="https://sourceforge.net/projects/xmlunit/files/xmlunit%20for%20.Net/XMLUnit%20for%20.NET%200.4/">XmlUnit +.Net 0.4</a>, April 2009</p> <p>XMLUnit for .Net provides NUnit extension classes written in C#, e.g. <code>XmlAssertion</code> and <code>XmlDiff</code>, that allow assertions to be made about the differences between two pieces of XML, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: SourceForge.net <no...@so...> - 2013-02-06 14:44:53
|
Feature Requests item #3602981, was opened at 2013-02-01 07:05 Message generated for change (Comment added) made by dportabella You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=3602981&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: David Portabella Clotet (dportabella) Assigned to: Nobody/Anonymous (nobody) Summary: Diff failswith xsi:type and different prefix Initial Comment: This code: import org.custommonkey.xmlunit.Diff; String result = "<ns1:Square xsi:type=\"ns1:Shape\" xmlns:ns1=\"http://example.com/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; String correct = "<ns2:Square xsi:type=\"ns2:Shape\" xmlns:ns2=\"http://example.com/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"/>"; Diff diff = new Diff(result, correct); System.out.println("diff:" + diff); System.out.println("diff.similar(): " + diff.similar()); results in: diff: org.custommonkey.xmlunit.Diff [not identical] Expected namespace prefix 'ns1' but was 'ns2' - comparing <ns1:Square...> at /Square[1] to <ns2:Square...> at /Square[1] [different] Expected attribute value 'ns1:Shape' but was 'ns2:Shape' - comparing <ns1:Square xsi:type="ns1:Shape"...> at /Square[1]/@type to <ns2:Square xsi:type="ns2:Shape"...> at /Square[1]/@type diff.similar(): false --- someone posted a fix here: http://stackoverflow.com/questions/14647861/xmlunit-diff-returns-similar-false-if-there-is-a-xsitype-and-a-different-namesp/14648786#14648786 ---------------------------------------------------------------------- >Comment By: David Portabella Clotet (dportabella) Date: 2013-02-06 06:44 Message: Hi, I tried your last revision, 517, and it works correctly! for the case i reported, and other cases also. please let me now about your new release. regards, David ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-03 02:43 Message: The only remaining xsi-attribute is xsi:nil which - I think - is handled reasonably. I'm preparing a new release, would be good if you could test the fix before I finalize it. If you have any trouble building XMLUnit from source, I'll be happy to provide a binary. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-02 06:53 Message: This should be fixed with svn revision 502 in the 1.x Branch https://xmlunit.svn.sourceforge.net/svnroot/xmlunit/branches/xmlunit-1.x Can you try to build it yourself to see whether it works for you? Before I cut a new release I want to look around the Schema Instance namespace to see whether there is anything else XMLUnit could support in a better way. ---------------------------------------------------------------------- Comment By: Stefan Bodewig (bodewig) Date: 2013-02-01 08:22 Message: Actually, XMLUnit doesn't really support much of the XML-Schema Instance stuff at all. I've started to fix it in the 1.x branch and simply ignoring the namespace prefix is trivial for this case, making sure the prefixes map to the same NS uris seems more difficult, at least as long as I'm in Java 1.4 land. Once this is fixed I'll roll a new release. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377771&aid=3602981&group_id=23187 |
From: SourceForge.net <no...@so...> - 2013-02-03 15:09:22
|
Bugs item #2880531, was opened at 2009-10-16 07:44 Message generated for change (Comment added) made by bodewig You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=2880531&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Pending >Resolution: Invalid Priority: 5 Private: No Submitted By: Hans Pikkemaat (thehpi) Assigned to: Nobody/Anonymous (nobody) Summary: xml file comparison fails Initial Comment: If I run attached java example with arguments the 2 other file attachments, the comparison fails. Maybe I'm wrong but I would expect this to succeed. I used a macbook pro on java 1.5. If I'm making a mistake please let me know. Hans ---------------------------------------------------------------------- >Comment By: Stefan Bodewig (bodewig) Date: 2013-02-03 07:09 Message: I'm sorry, I really should have responded earlier. I somehow missed this bug report. RecursiveElementNameAndTextQualifier doesn't apply to your case, it only works if there only is a single child element with text content, in your case there are two such p elements in each b. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=2880531&group_id=23187 |
From: <bo...@us...> - 2013-02-03 15:05:39
|
Revision: 517 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=517&view=rev Author: bodewig Date: 2013-02-03 15:05:33 +0000 (Sun, 03 Feb 2013) Log Message: ----------- Correct the statements about XPath and default namespaces, Issue 3536354 Modified Paths: -------------- branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml Modified: branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml =================================================================== --- branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml 2013-02-03 14:32:36 UTC (rev 516) +++ branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml 2013-02-03 15:05:33 UTC (rev 517) @@ -2862,8 +2862,10 @@ (<literal>String</literal>) prefixes as keys and (<literal>String</literal>) namespace URIs as values.</para> - <para>The empty string is used as prefix for the default - namespace of a document.</para> + <para>Note there is nothing like a default namespace in XPath + selectors. If you are using namespaces in your XPath, all + namespaces need a prefix (of length greater than zero). This + is independent of the prefixes used in your document.</para> <para>The following example is taken from XMLUnit's own tests. It demonstrates that the namespace prefix of the document under This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bo...@us...> - 2013-02-03 14:32:43
|
Revision: 516 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=516&view=rev Author: bodewig Date: 2013-02-03 14:32:36 +0000 (Sun, 03 Feb 2013) Log Message: ----------- remove logo from user's guide Modified Paths: -------------- branches/xmlunit-1.x/docbook.xml branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml Modified: branches/xmlunit-1.x/docbook.xml =================================================================== --- branches/xmlunit-1.x/docbook.xml 2013-02-03 12:40:21 UTC (rev 515) +++ branches/xmlunit-1.x/docbook.xml 2013-02-03 14:32:36 UTC (rev 516) @@ -98,7 +98,7 @@ <target name="-users-guide-html-xsltproc" depends="-xsltproc-available?,-users-guide-html-pre" if="run xsltproc"> - <exec command="${xsltproc}" failonerror="true"> + <exec executable="${xsltproc}" failonerror="true"> <arg value="-o"/> <!-- xsltproc needs the trailing slash to work properly --> <arg value="${html.dir}/"/> @@ -117,7 +117,6 @@ depends="-users-guide-html-trax,-users-guide-html-xsltproc" unless="HTML is up-to-date" description="Creates HTML version of the User's Guide"> - <copy file="${src.dir}/site/xmlunit.png" toDir="${html.dir}"/> </target> <target name="-check-os"> @@ -159,7 +158,6 @@ <target name="users-guide-pdf" depends="-define-dblatex" description="Creates the PDF version of the User's Guide"> - <copy file="${src.dir}/site/xmlunit.png" toDir="${src.userguide.dir}"/> <dblatex sourcefile="${src.userguide.dir}/${user.guide}.xml"/> <move file="${src.userguide.dir}/${user.guide}.pdf" todir="${userguide.docs.dir}"/> Modified: branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml =================================================================== --- branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml 2013-02-03 12:40:21 UTC (rev 515) +++ branches/xmlunit-1.x/src/user-guide/XMLUnit-Java.xml 2013-02-03 14:32:36 UTC (rev 516) @@ -34,12 +34,7 @@ --> <article> - <title>XMLUnit Java User's Guide - <inlinemediaobject><imageobject> - <imagedata fileref="xmlunit.png" width="331" depth="100" - valign="middle" format="PNG"/> - </imageobject></inlinemediaobject> - </title> + <title>XMLUnit Java User's Guide</title> <articleinfo> <authorgroup> <author> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |