NUnit 是否有 XML 断言? [英] Is there an XML asserts for NUnit?

查看:53
本文介绍了NUnit 是否有 XML 断言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

NUnit 是否支持(可能通过使用第三方库)对 XML 数据进行智能比较.

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

假设我们需要比较两个 xml 文件 - 最简单的方法是使用不区分大小写的字符串比较来比较 xml 内容,但这仅适用于微不足道的情况.

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.

是否有任何可以简化 xml 比较的库 - 例如某种 XmlAssert?

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

我追求的功能 - 有两个 xml 文件,比较这些节点(因为它们很重要)并忽略其余的".

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

推荐答案

有关于移植 XMLUnit 的工作到.Net.我只用过Java版本,不知道移植的完整程度如何.它可能还没有准备好迎接黄金时段...

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...

这篇关于NUnit 是否有 XML 断言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆