Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XML Unit testing: XmlUnit alternatives for .NET?

I'm looking for XmlUnit alternatives, since:

  • XmlUnit looks like a dead project: "The current release is XmlUnit .Net 0.4, April 2009";
  • "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." (that says it all)
  • It's bugged Are there any alternatives to XmlUnit?
  • I don't really like its static configuration: Are there any alternatives to XmlUnit?

How do you test your xml serialization/deserialization?

PS: More details:

  • I'm using NUnit
  • I'm stuck with .NET 2
like image 329
Notoriousxl Avatar asked Oct 23 '11 12:10

Notoriousxl


1 Answers

I read that you look for a purely NUnit-based solution, but I think it's worth to mention that Gallio/MbUnit provides several interesting assertions for testing XML. More information and examples on the Gallio wiki.

Assert.Xml.AreEqual(
  "<value x='123' y='456'/>", 
  "<VALUE y='456' x='123'></VALUE>", 
  XmlOptions.Loose); // Pass!
like image 62
Yann Trevin Avatar answered Sep 22 '22 06:09

Yann Trevin