From: <bo...@us...> - 2010-07-15 06:32:51
|
Revision: 415 http://xmlunit.svn.sourceforge.net/xmlunit/?rev=415&view=rev Author: bodewig Date: 2010-07-15 06:32:45 +0000 (Thu, 15 Jul 2010) Log Message: ----------- extract more information from test failure on Mono - Mono seems to resolve the file differently, will need to develop on Windows and Mono in parallel to resolve this - oh my Modified Paths: -------------- trunk/xmlunit/src/tests/net-core/validation/ValidatorTest.cs Modified: trunk/xmlunit/src/tests/net-core/validation/ValidatorTest.cs =================================================================== --- trunk/xmlunit/src/tests/net-core/validation/ValidatorTest.cs 2010-07-15 06:22:44 UTC (rev 414) +++ trunk/xmlunit/src/tests/net-core/validation/ValidatorTest.cs 2010-07-15 06:32:45 UTC (rev 415) @@ -12,6 +12,7 @@ limitations under the License. */ using System; +using System.Collections.Generic; using NUnit.Framework; using net.sf.xmlunit.exceptions; using net.sf.xmlunit.input; @@ -33,8 +34,13 @@ Validator v = Validator.ForLanguage(Languages.W3C_XML_SCHEMA_NS_URI); v.SchemaSource = new StreamSource("../../../src/tests/resources/Book.xsd"); ValidationResult r = v.ValidateInstance(new StreamSource("../../../src/tests/resources/BookXsdGenerated.xml")); - Assert.IsTrue(r.Valid); - Assert.IsFalse(r.Problems.GetEnumerator().MoveNext()); + IEnumerator<ValidationProblem> problems = r.Problems.GetEnumerator(); + bool haveErrors = problems.MoveNext(); + + Assert.IsTrue(r.Valid, + "Expected validation to pass, first validation error" + + " is " + problems.Current.Message); + Assert.IsFalse(haveErrors); } [Test] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |