Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an XML asserts for NUnit?

Does NUnit support (perhaps by using a third party libraries) a smart comparison for XML data.

Let's say we need to compare two xml files - the simplest way would be to compare xml content using the no-case sensitive string comparison, but that would only work in a trivial cases.

Is there any library around which could simplify xml comparison - e.g. some kind of XmlAssert?

The functionality I am after - "having a two xml files, compare these nodes (because they are important) and ignore the rest".

Similar questions

  • What is the best way to compare XML files for equality?
  • How would you compare two XML Documents?
like image 998
Andrew Avatar asked Aug 24 '10 00:08

Andrew


People also ask

How do I use assert in NUnit?

Asserts that a condition is true. If the condition is false the method throws an AssertionException. Asserts that a condition is true. If the condition is false the method throws an AssertionException.

Which of the following are assertion models in NUnit?

There are two assertion models in NUnit Test: Classic Model: Before NUnit 2.4, each assertion was handled by various types of Assert class functions. This is referred to as the classic model. Constraint Model: A revolutionary constraint-based framework is being introduced with NUnit 2.4.

How do you make a mock object in NUnit?

The three key steps to using mock objects for testing are: Use an interface to describe the object. Implement the interface for production code. Implement the interface in a mock object for testing.

What is NUnit software testing?

NUnit is an open-source unit testing framework for the . NET Framework and Mono. It serves the same purpose as JUnit does in the Java world, and is one of many programs in the xUnit family.


1 Answers

There is work on porting XMLUnit to .Net. I've only used the Java version, and don't know how complete the port is. It may not be ready for prime-time...

like image 117
Don Roby Avatar answered Oct 02 '22 02:10

Don Roby