Runtime conditional skip test #1784
-
I have an example previously that I used Xunit with a custom FactAttribute where I would assess a runtime condition and then set the Skip property. Is there an easy way to accomplish this in TUnit?
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Skip.Test("reason") |
Beta Was this translation helpful? Give feedback.
-
What do you recommend for the right hook for this Skip call? |
Beta Was this translation helpful? Give feedback.
-
Ah, looks like it throws an exception you're handling under the covers. So not really a need for a hook per se, it can just go in the test itself. |
Beta Was this translation helpful? Give feedback.
Skip.Test("reason")