Linter/formatter pass across the full codebase. Restores required partial keyword on AXAML code-behind classes that the formatter incorrectly removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
35 lines
983 B
C#
35 lines
983 B
C#
using CliFx.Infrastructure;
|
|
|
|
namespace ZB.MOM.WW.LmxOpcUa.Client.CLI.Tests;
|
|
|
|
/// <summary>
|
|
/// Helper for creating CliFx <see cref="FakeInMemoryConsole" /> instances and reading their output.
|
|
/// </summary>
|
|
public static class TestConsoleHelper
|
|
{
|
|
/// <summary>
|
|
/// Creates a new <see cref="FakeInMemoryConsole" /> for testing.
|
|
/// </summary>
|
|
public static FakeInMemoryConsole CreateConsole()
|
|
{
|
|
return new FakeInMemoryConsole();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Reads all text written to the console's standard output.
|
|
/// </summary>
|
|
public static string GetOutput(FakeInMemoryConsole console)
|
|
{
|
|
console.Output.Flush();
|
|
return console.ReadOutputString();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Reads all text written to the console's standard error.
|
|
/// </summary>
|
|
public static string GetError(FakeInMemoryConsole console)
|
|
{
|
|
console.Error.Flush();
|
|
return console.ReadErrorString();
|
|
}
|
|
} |