From: <bo...@us...> - 2008-01-28 14:49:46
|
Revision: 237 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=237&view=rev Author: bodewig Date: 2008-01-28 06:49:49 -0800 (Mon, 28 Jan 2008) Log Message: ----------- make stuff work with NUnit 2.4 Modified Paths: -------------- trunk/xmlunit/NUnit.ReadMe trunk/xmlunit/src/csharp/AssemblyInfo.cs trunk/xmlunit/tests/csharp/DiffConfigurationTests.cs trunk/xmlunit/tests/csharp/XmlAssertionTests.cs trunk/xmlunit/xmlunit.nant.build Modified: trunk/xmlunit/NUnit.ReadMe =================================================================== --- trunk/xmlunit/NUnit.ReadMe 2008-01-04 10:24:02 UTC (rev 236) +++ trunk/xmlunit/NUnit.ReadMe 2008-01-28 14:49:49 UTC (rev 237) @@ -2,16 +2,20 @@ ================ To run this software you will need: -- Nunit v2.1 (http://nunit.org/) -- .NET runtime v1.1 or Mono runtime v0.28 (or above) +- Nunit v2.2 or above (http://nunit.org/) +- .NET runtime v1.1 or Mono runtime v1.0 (or above) If you want to build the source code yourself you will also need NAnt (http://nant.sourceforge.net/) -This build of the source code was prepared using .NET csc 1.1.4322, NUnit2.1.4, and NAnt0.8.3 +This build of the source code was prepared using .NET csc 1.1.4322, NUnit2.4.6, and NAnt0.8.5 Enjoy! http://xmlunit.sourceforge.net/ +Changes in version 0.3.1: +- made it compile and all tests pass on .NET 1.1 as well as 2.0 and + NUnit 2.4 + Changes in version 0.3: - New XSLT assertions - New XmlOutput class @@ -23,4 +27,4 @@ - Removed (ab)use of statics - thanks Joe Changes in version 0.1: -- New classes for basic xml differencing \ No newline at end of file +- New classes for basic xml differencing Modified: trunk/xmlunit/src/csharp/AssemblyInfo.cs =================================================================== --- trunk/xmlunit/src/csharp/AssemblyInfo.cs 2008-01-04 10:24:02 UTC (rev 236) +++ trunk/xmlunit/src/csharp/AssemblyInfo.cs 2008-01-28 14:49:49 UTC (rev 237) @@ -23,7 +23,7 @@ // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("0.3.0.0")] +[assembly: AssemblyVersion("0.3.1.0")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. Modified: trunk/xmlunit/tests/csharp/DiffConfigurationTests.cs =================================================================== --- trunk/xmlunit/tests/csharp/DiffConfigurationTests.cs 2008-01-04 10:24:02 UTC (rev 236) +++ trunk/xmlunit/tests/csharp/DiffConfigurationTests.cs 2008-01-28 14:49:49 UTC (rev 237) @@ -21,24 +21,30 @@ new XmlDiff("", "").OptionalDescription); } - [Test][ExpectedException(typeof(XmlSchemaValidationException))] + [Test] public void DefaultConfiguredToUseValidatingParser() { DiffConfiguration diffConfiguration = new DiffConfiguration(); Assert.AreEqual(DiffConfiguration.DEFAULT_USE_VALIDATING_PARSER, diffConfiguration.UseValidatingParser); - FileStream controlFileStream = File.Open(ValidatorTests.VALID_FILE, - FileMode.Open, FileAccess.Read); - FileStream testFileStream = File.Open(ValidatorTests.INVALID_FILE, - FileMode.Open, FileAccess.Read); - try { + bool exception = false; + using (FileStream controlFileStream = File.Open(ValidatorTests.VALID_FILE, + FileMode.Open, + FileAccess.Read)) + using (FileStream testFileStream = File.Open(ValidatorTests.INVALID_FILE, + FileMode.Open, + FileAccess.Read)) { + try { XmlDiff diff = new XmlDiff(new StreamReader(controlFileStream), new StreamReader(testFileStream)); diff.Compare(); - } finally { - controlFileStream.Close(); - testFileStream.Close(); + } catch (System.Exception) { + // should be an XmlSchemaValidationException in .NET 2.0 + // and later + exception = true; + } } + Assert.IsTrue(exception, "expected validation to fail"); } [Test] Modified: trunk/xmlunit/tests/csharp/XmlAssertionTests.cs =================================================================== --- trunk/xmlunit/tests/csharp/XmlAssertionTests.cs 2008-01-04 10:24:02 UTC (rev 236) +++ trunk/xmlunit/tests/csharp/XmlAssertionTests.cs 2008-01-28 14:49:49 UTC (rev 237) @@ -29,7 +29,7 @@ XmlAssertion.AssertXmlIdentical(diff); caughtException = false; } catch (NUnit.Framework.AssertionException e) { - Assert.IsTrue(e.Message.StartsWith(description)); + Assert.IsTrue(e.Message.IndexOf(description) > -1); } Assert.IsTrue(caughtException); } @@ -43,7 +43,7 @@ XmlAssertion.AssertXmlEquals(diff); caughtException = false; } catch (NUnit.Framework.AssertionException e) { - Assert.AreEqual(true, e.Message.StartsWith(description)); + Assert.IsTrue(e.Message.IndexOf(description) > -1); } Assert.IsTrue(caughtException); } Modified: trunk/xmlunit/xmlunit.nant.build =================================================================== --- trunk/xmlunit/xmlunit.nant.build 2008-01-04 10:24:02 UTC (rev 236) +++ trunk/xmlunit/xmlunit.nant.build 2008-01-28 14:49:49 UTC (rev 237) @@ -1,5 +1,5 @@ <project name="xmlunit" description="XmlUnit for .Net" default="compile"> - <property name="project.version" value="0.3" overwrite="false"/> + <property name="project.version" value="0.3.1" overwrite="false"/> <property name="base.dir" value="${project::get-base-directory()}" overwrite="false"/> <property name="src.dir" value="${base.dir}/src/csharp" overwrite="false"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |