CommandAppTester Class
A
CommandApp
test harness.
public sealed class CommandAppTester
- Namespace
- Spectre
.Console .Testing
Constructors
-
CommandAppTester
( Command App Tester Settings) -
Initializes a new instance of the
CommandAppTester
class. -
CommandAppTester
(ITypeRegistrar, Command App Tester Settings, TestConsole) -
Initializes a new instance of the
CommandAppTester
class.
Properties
- TestConsole Console
- Gets the test console used by both the CommandAppTester and CommandApp.
- ITypeRegistrar Registrar
- Gets or sets the Registrar to use in the CommandApp.
- CommandAppTesterSettings TestSettings
-
Gets or sets the settings for the
CommandAppTester
.
Methods
-
void Configure
(Action < I Configurator> ) - Configures the command application.
-
CommandAppResult Run
(string[]) - Runs the command application.
-
CommandAppFailure RunAndCatch
<T> (string[]) - Runs the command application and expects an exception of a specific type to be thrown.
-
Task<CommandAppResult> RunAsync
(string[]) - Runs the command application asynchronously.
-
void SetDefaultCommand
<T> (string, object) - Sets the default command.