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?
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 formatkey[value]
. E.g. if you want to use[Trait("Owner", "Matt")]
, you would filter for a category ofOwner[Matt]
.The trait key
Category
is treated differently, and just the value is used, so[Trait("Category", "integration")]
would useintegration
as the category filter in the resharper options.