Reputation: 1224
having:
[Category("Contract")]
public class ProgramClientShould
{
}
or:
[Trait("Contract", null)]
public class ProgramClientShould
{
}
and Resharper -> Options -> Tools -> Unit Testing: "Skip tests from categories" with value "Contract"
Still, tests in ProgramClientShould are executed. What's wrong?
Upvotes: 8
Views: 2104
Reputation: 18573
xunit doesn't have a Category
attribute, so the resharper runner won't recognise that. As for the trait attribute, you need to provide a value, then filter for something in the format key[value]
. E.g. if you want to use [Trait("Owner", "Matt")]
, you would filter for a category of Owner[Matt]
.
The trait key Category
is treated differently, and just the value is used, so [Trait("Category", "integration")]
would use integration
as the category filter in the resharper options.
Upvotes: 12