Created
March 4, 2016 13:35
-
-
Save seesharper/00523e2c9ba45d5fb77f to your computer and use it in GitHub Desktop.
Capture Xunit20 output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class TestOutputHelper | |
| { | |
| private static readonly AsyncLocal<ITestOutputHelper> CurrentTestOutputHelper | |
| = new AsyncLocal<ITestOutputHelper>(); | |
| public static void Capture(this ITestOutputHelper outputHelper) | |
| { | |
| CurrentTestOutputHelper.Value = outputHelper; | |
| } | |
| public static ITestOutputHelper Current => CurrentTestOutputHelper.Value; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment