Skip tests even if SkipException is coming from within Assert.Throws #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated in #12 (comment)
As described in xunit/xunit#1722 the
Xunit.Sdk.ThrowsException
that is thrown from a failed execution ofAssert.Throws
(and related) does not capture the exception actually thrown.The thrown Exception message does however contain the string
Actual: typeof(Xunit.SkipException)
if aSkipException
was thrown inside the action or function passed toAssert.Throws
.Although the solution to search the
ThrowsException
message for that string is far from elegant, it works and can be replaced when xunit/xunit#1722 has been fixed.Fixes #10.