views:

16

answers:

1

Hi

Is there a way in MBUnit to have the same test called multiple times with different parameters 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).

A: 

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?

Igor Brejc
MHTri
Igor Brejc
Thank you very much, that pattern is a brilliant idea.
MHTri