lishijie211 / mb-unit

Automatically exported from code.google.com/p/mb-unit
0 stars 0 forks source link

Assert.Xml.AreEqual() throws System.ArgumentOutOfRangeException for some xml #841

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a unit test project with the attached test class.
2. Run the test.

What is the expected output? What do you see instead?
Expected:
"Gallio.Framework.Assertions.AssertionFailureException: Expected the XML 
fragments to be equal but x differences were found ..."

Actual: 
"Gallio.Framework.Assertions.AssertionFailureException: An exception occurred 
while verifying an assertion.

System.ArgumentOutOfRangeException: Index was out of range. Must be 
non-negative and less than the size of the collection.
Parameter name: index
ParamName: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException()
   at Gallio.Common.Xml.Paths.XmlPathStrictAttribute.FindInParent(INode parent)
   at Gallio.Common.Xml.NodeFragment.Find(IXmlPathStrict path)
   at Gallio.Common.Xml.Paths.XmlPathRenderer.ProcessPathNode(IXmlPathStrict path, Int32 level)
   at Gallio.Common.Xml.Diffing.Diff.ToAssertionFailure(NodeFragment expected, NodeFragment actual)
   at Gallio.Common.Xml.Diffing.DiffSet.<ToAssertionFailures>d__5.MoveNext()
   at Gallio.Framework.Assertions.AssertionFailureBuilder.AddInnerFailures(IEnumerable`1 innerFailures)
   ...
"

What version of the product are you using? On what operating system?
GallioBundle-3.2.750.0
Windows 7 Professional, Visual Studio 2010 Ultimate, Resharper 5.1

Please provide any additional information below.

Original issue reported on code.google.com by tamas.ar...@gmail.com on 11 May 2011 at 12:15

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, attaching the correct file.

Original comment by tamas.ar...@gmail.com on 11 May 2011 at 12:19

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 11 May 2011 at 12:47

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 11 May 2011 at 1:48

GoogleCodeExporter commented 9 years ago
Fixed. Should be available soon in the next v3.2 and v3.3 builds.

Original comment by Yann.Tre...@gmail.com on 12 May 2011 at 8:00

GoogleCodeExporter commented 9 years ago
Confirmed. Works fine with build 3.2.820. Thanks!

Original comment by tamas.ar...@gmail.com on 17 May 2011 at 7:55

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 17 May 2011 at 8:58

GoogleCodeExporter commented 9 years ago

Original comment by Yann.Tre...@gmail.com on 14 Jun 2011 at 5:48