mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-06 04:28:15 +08:00
Changed IConfigurator to return IConfigurator instead of void for (#1762)
This commit is contained in:
@ -348,10 +348,10 @@ public sealed partial class CommandAppTests
|
||||
fixture.SetDefaultCommand<LionCommand>();
|
||||
fixture.Configure(configurator =>
|
||||
{
|
||||
configurator.SetApplicationName("myapp");
|
||||
configurator.AddExample("20", "--alive");
|
||||
configurator.AddCommand<GiraffeCommand>("giraffe");
|
||||
configurator.SetHelpProvider(new RenderMarkupHelpProvider(configurator.Settings));
|
||||
configurator.SetApplicationName("myapp")
|
||||
.SetHelpProvider(new RenderMarkupHelpProvider(configurator.Settings))
|
||||
.AddExample("20", "--alive")
|
||||
.AddCommand<GiraffeCommand>("giraffe");
|
||||
});
|
||||
|
||||
// When
|
||||
@ -539,10 +539,9 @@ public sealed partial class CommandAppTests
|
||||
fixture.Configure(configurator =>
|
||||
{
|
||||
// Configure the custom help provider type
|
||||
configurator.SetHelpProvider<RedirectHelpProvider>();
|
||||
|
||||
configurator.SetApplicationName("myapp");
|
||||
configurator.AddCommand<DogCommand>("dog");
|
||||
configurator.SetHelpProvider<RedirectHelpProvider>()
|
||||
.SetApplicationName("myapp")
|
||||
.AddCommand<DogCommand>("dog");
|
||||
});
|
||||
|
||||
// When
|
||||
@ -952,12 +951,12 @@ public sealed partial class CommandAppTests
|
||||
configurator.SetApplicationName("myapp");
|
||||
|
||||
// All root examples should be shown
|
||||
configurator.AddExample("--name", "Rufus", "--age", "12", "--good-boy");
|
||||
configurator.AddExample("--name", "Luna");
|
||||
configurator.AddExample("--name", "Charlie");
|
||||
configurator.AddExample("--name", "Bella");
|
||||
configurator.AddExample("--name", "Daisy");
|
||||
configurator.AddExample("--name", "Milo");
|
||||
configurator.AddExample("--name", "Rufus", "--age", "12", "--good-boy")
|
||||
.AddExample("--name", "Luna")
|
||||
.AddExample("--name", "Charlie")
|
||||
.AddExample("--name", "Bella")
|
||||
.AddExample("--name", "Daisy")
|
||||
.AddExample("--name", "Milo");
|
||||
});
|
||||
|
||||
// When
|
||||
|
Reference in New Issue
Block a user