开发者

MBUnit - Calling the same method multiple times in a sequence?

Is there a way in MBUnit to have the same test called multiple times with different param开发者_JS百科eters in a sequence, as such:

Method1() Method2(param A) Method3() Method2(ParamB) Method4() Method2(ParamC)

etc? I've tried using the Order parameter but sadly I was too hopeful in that the Ordering would be considered class-wide rather than test-wide (1,2,3,4,5,6 as opposed to 1,2a,2b,2c,3,4).


Can you explain the reasons for needing this? This sounds like you have dependencies between your test methods, which in general isn't a good way to go about writing test code.

If you need something to be called in a particular sequence then why not simply expose it as a single test method which calls certain submethods in the order of your choosing?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜