开发者

How to pass Xml data as a parameter to a Test in mbunit v3

I was reading about data driven testing using mbunit from this article. http://blog.benhall.me.uk/2007/04/mbunit-datafixture-data-driven-unit.html I am using v3 of mbunit now and the attributes used for DataDriv开发者_如何学JAVAen testing are Not applicable in V3 as per the release notes for V3. Using this article http://blog.bits-in-motion.com/2009/03/announcing-gallio-and-mbunit-v306.html, I was able to do Data Driven testing using xml data source. But I have to use [Bind("price")] with each parameter. In V2, there was a way to specify the datatype of a class, deserialized to contain the xml data, in the ForEachTest attribute. And doing so we can just pass the object of the class to the test method as a parameter. Is there any way to do such thing in v3?


This is not supported in Gallio/MbUnit v3.2 yet. You must bind each single parameter with the [Bind] attribute.

It's a excellent idea however; and an issue was created accordingly. It should make v3.3.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜