Xunit v3 has built-in skipping support, which I'm delighted to see.
Upon closer inspection, it's not a superset of Xunit.SkippableFact yet, due to two things:
- Lack of a convenient
Skip.If API. Maybe SkipException could itself have the If and IfNot methods on it.
- The
FactAttribute and TheoryAttribute could add a SkipExceptions property, so that user can add additional exceptions that, if thrown from the test method, will be reported as a skip.
While no. 1 is merely a convenience, no. 2 is quite common for platform-specific test considerations. Folks will add NotSupportedException or PlatformNotSupportedException or even NotImplementedException to this list.
Without these, folks can still workaround it by adding if blocks and try/catch blocks, but it's significantly more tedious.
Sincerely,
The author of Xunit.SkippableFact, who is eager to retire it in favor of directing folks to Xunit v3.
Xunit v3 has built-in skipping support, which I'm delighted to see.
Upon closer inspection, it's not a superset of Xunit.SkippableFact yet, due to two things:
Skip.IfAPI. MaybeSkipExceptioncould itself have theIfandIfNotmethods on it.FactAttributeandTheoryAttributecould add aSkipExceptionsproperty, so that user can add additional exceptions that, if thrown from the test method, will be reported as a skip.While no. 1 is merely a convenience, no. 2 is quite common for platform-specific test considerations. Folks will add
NotSupportedExceptionorPlatformNotSupportedExceptionor evenNotImplementedExceptionto this list.Without these, folks can still workaround it by adding
ifblocks andtry/catchblocks, but it's significantly more tedious.Sincerely,
The author of Xunit.SkippableFact, who is eager to retire it in favor of directing folks to Xunit v3.