Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would be usefull to allow using the config or a constructor to pass a test console which could be configured externally #1718

Open
scarbon opened this issue Dec 22, 2024 · 0 comments

Comments

@scarbon
Copy link

scarbon commented Dec 22, 2024

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo 🕑
Development

No branches or pull requests

1 participant