It would be usefull to allow the constructor to pass a test console which could be configured externally, I would like to do integration test with interactive test inputs into console but cant do it externally without having to implement my own CommandAppTester since class is sealed. Perhaps just like with a test register we could pass this onto the constructor or maybe use the config console method could be an alternative.
public CommandAppTester(ITypeRegistrar? registrar = null, TestConsole? console = null)
{
Registrar = registrar;
_console = console ?? new TestConsole().Width(int.MaxValue);
}
Here we coud use the _console
|
var console = new TestConsole().Width(int.MaxValue); |
|
var console = new TestConsole().Width(int.MaxValue); |
Woud be happy to raise a PR (if I'm allowed to)
It would be usefull to allow the constructor to pass a test console which could be configured externally, I would like to do integration test with interactive test inputs into console but cant do it externally without having to implement my own CommandAppTester since class is sealed. Perhaps just like with a test register we could pass this onto the constructor or maybe use the config console method could be an alternative.
Here we coud use the _console
spectre.console/src/Spectre.Console.Testing/Cli/CommandAppTester.cs
Line 107 in 58bf89a
spectre.console/src/Spectre.Console.Testing/Cli/CommandAppTester.cs
Line 153 in 58bf89a
Woud be happy to raise a PR (if I'm allowed to)