I'm playing with SpecFlow, and ReSharper thinks that my step definitions are unused (I guess because they're used via reflection):
[Binding]
public class StepDefinitions
{
// ...
[When(@"I press add")]
public void WhenIPressAdd() // R# thinks this is unused
{
_calculator.PressAdd();
}
// ...
}
How can I tell ReSharper that methods with [Given]
, [When]
, [Then]
attributes (etc.) are actually used? I don't want to use // ReSharper disable UnusedMember.Global
comments.
I could also mark each method (or the whole class) with [JetBrains.Annotations.UsedImplicitly]
. I don't particularly want to do that either.