mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
20 lines
552 B
C#
20 lines
552 B
C#
using CliFx.Infrastructure;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace CliFx.Tests.Utils.Extensions;
|
|
|
|
internal static class ConsoleExtensions
|
|
{
|
|
public static void DumpToTestOutput(
|
|
this FakeInMemoryConsole console,
|
|
ITestOutputHelper testOutputHelper
|
|
)
|
|
{
|
|
testOutputHelper.WriteLine("[*] Captured standard output:");
|
|
testOutputHelper.WriteLine(console.ReadOutputString());
|
|
|
|
testOutputHelper.WriteLine("[*] Captured standard error:");
|
|
testOutputHelper.WriteLine(console.ReadErrorString());
|
|
}
|
|
}
|