site/xunit.analyzers/rules/xUnit9006.md
A violation of this rule occurs when the user sets both the SkipUnless and SkipWhen properties for conditional skipping.
It is only legal to set one or the other property; it is not legal to set both properties.
To fix a violation of this rule, remove on the declarations.
using Xunit;
public class xUnit9006
{
public static bool AlwaysTrue => true;
[Fact(Skip = "Don't run", SkipWhen = nameof(AlwaysTrue), SkipUnless = nameof(AlwaysTrue))]
public void Fact()
{ }
}
using Xunit;
public class xUnit9006
{
public static bool AlwaysTrue => true;
[Fact(Skip = "Don't run", SkipWhen = nameof(AlwaysTrue))]
public void Fact()
{ }
}