There is no way currently to mark an individual test case as explicit when
using the TestCase attribute.
I am guessing that you did something like this...
[TestCase(...)]
[TestCase(...)]
[TestCase(...), Explicit]]
[TestCase(...)]
However, that would mark method as Explicit, not the individual case. If you
run the containing test fixture, none of your test cases will run.
That's because
[TestCase(...), Explicit] is semantically equivalent to this:
[TestCase(...)]
[Explicit]
You might think we could take the position of attributes into account and apply
this to the preceding or following test case, but that's not so.
Without examining
the source, it's not possible to determine the lexical order of
attributes reliably.
When we reflect over them, the order in which they are returned varies between
different implementations - even different versions - of the runtime.
One short-term fix would be to mark the individual test case as Ignored, using
the Ignore (synonymous with Ignored) or IgnoreReason named parameter,
like this: [TestCase(..., IgnoreReason="Network problem")] This will cause the
test case to be ignored until the problem is fixed and you change the code. An
alternative, of course, is to simply comment out the test case, but then you
have to remember to uncomment it when it's ready to run again.
For NUnit 2.6, we could add an Explicit named parameter to TestCaseAttribute.
Would you file a request for this on launchpad?
Charlie
> --
> You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nunit-discuss?hl=en.
>
>
Hi All,
I am looking for a moke project having test case as well,so i can test in Junit.PLease send me the information on Vineet....@hotmail.com
Many Thanks in Advance,
Cheers,
Vineet Chauhan
Charlie