Skip to content

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

@scarbon

Description

@scarbon

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)

Metadata

Metadata

Assignees

Labels

area: testsSpectre.Console testing framework for developers.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions