You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Potential breaking change: `TestCaptureLogger<T>` no longer inherits from `TestCaptureLogger`.
17
17
- Add `ITestCaptureLogger` and have `TestCaptureLogger` and `TestCaptureLogger<T>` be concrete implementations of the interface so you can reference the interface and not care which concrete implementation you have.
18
+
-#170: Additional xunit extension methods to write out all log messages to the `ITestOutputHelper`.
@@ -36,11 +36,47 @@ public void RenderedLogMessagesGetSentToOutputTestHelper()
36
36
37
37
varlogs=logger.GetLogs();
38
38
outputHelper.WriteLogs(logs);
39
-
39
+
40
+
outputHelper.Messages[0].ShouldBe("[0 Information Stravaig.Extensions.Logging.Diagnostics.Tests.XUnit.OutputTestHelperExtensionTests] This is an information Message.");
41
+
outputHelper.Messages[1].ShouldBe("[1 Information Stravaig.Extensions.Logging.Diagnostics.Tests.XUnit.OutputTestHelperExtensionTests] This is a Warning Message.");
logger.LogInformation("This is an information Message.");
51
+
logger.LogInformation("This is a Warning Message.");
52
+
53
+
outputHelper.WriteLogs(logger);
54
+
40
55
outputHelper.Messages[0].ShouldBe("[0 Information Stravaig.Extensions.Logging.Diagnostics.Tests.XUnit.OutputTestHelperExtensionTests] This is an information Message.");
41
56
outputHelper.Messages[1].ShouldBe("[1 Information Stravaig.Extensions.Logging.Diagnostics.Tests.XUnit.OutputTestHelperExtensionTests] This is a Warning Message.");
0 commit comments