Unit Testing: MbUnit

It'd be great if Resharper recognized MbUnit, maybe even xUnit so it doesn't tell me my methods are never used.  Perhaps better yet, an option to indicate what [Attributes] indicate a test which could allow some basic test awareness for any framework in theory

6 comments
Comment actions Permalink

Hello,

It'd be great if Resharper recognized MbUnit, maybe even xUnit so it
doesn't tell me my methods are never used.  Perhaps better yet, an
option to indicate what indicate a test which could allow
some basic test awareness for any framework in theory


Do you have MBUnit support installed for ReSharper? If yes, then it's a bug
if its test methods are reported to be unused.

If no, you could annotate those with .
If they're not in your source code, then External Annotations could be used
(advanced thing; look for such folder under the Bin folder of ReSharper to
get the general idea).


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

No I do not have MbUnit support for Resharper installed. I looked for such a thing but I only found plugins for really old versions of Resharper and the links were dead.  Where/how do I do this for resharper 5.0 beta 2?

By the way your attribute links appear broken.  I saw the annotations section in resharper options but I couldn't make heads or tails of it on a quick look.

0
Comment actions Permalink

The latest Gallio v3.2 nightly builds support ReSharper 5.0 Beta 2.

0
Comment actions Permalink

Hello,

By the way your attribute links appear broken.


Matter of presentation of the Web mirror. Those are no links, just attribute
names in square brackets.

I saw the annotations
section in resharper options but I couldn't make heads or tails of it
on a quick look.


Yes, that's a bit more complicated. See the ExternalAnnotations folder under
ReSharper binaries. It makes ReSharper think that certain classes/methods/parameters
in DLLs have additional attributes on them, for example NotNullAttribute
or CanBeNullAttribute. Classes from MBUnit DLL defining its attributes for
marking test classes/methods could be annotated with ReSharper's MeansImplicitUseAttribute,
to tell ReSharper that any entities marked with MBUnit's attributes are not
to be considered unused.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

Gallio already returns true for the IsUnitTestMethod* stuff on IUnitTestProvider.  So iirc, ReSharper shouldn't anything else.

Earlier versions of Gallio sometimes returned incorrect results for this request though.

0
Comment actions Permalink

I'm getting the same thing with NUnit tests.  All my nunit tests are marked as not used.  Super annoying i'd love this to get fixed

0

Please sign in to leave a comment.