Changed IConfigurator to return IConfigurator instead of void for (#1762)

This commit is contained in:
Melvin Dommer
2025-02-24 14:57:23 -06:00
committed by GitHub
parent 11a320c7c9
commit 93668e92b6
3 changed files with 25 additions and 20 deletions

View File

@ -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