Skip to content

Commit 88b12b3

Browse files
committed
Feat: Add support for parsing boolean CLI arguments
Extended the test to verify handling of a new boolean CLI argument. Updated test input and assertions to include validation for the `--test-bool` parameter. This ensures proper parsing and functionality of the boolean argument.
1 parent d718e39 commit 88b12b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/Tests.CodeOfChaos.CliArgsParser/CliArgsParserTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public async Task ExecuteAsync_Test() {
2929
[Test]
3030
public async Task ExecuteAsync_TestWithServices() {
3131
// Arrange
32-
const string input = "test-service-command --test-required-string=\"something\"";
32+
const string input = "test-service-command --test-required-string=\"something\" --test-bool";
3333
var services = new ServiceCollection();
3434
services.AddSingleton<IService, Service>();
3535
ServiceProvider provider = services.BuildServiceProvider();
@@ -47,5 +47,6 @@ public async Task ExecuteAsync_TestWithServices() {
4747
TestCommandParameters? parameters = service.Parameters;
4848
await Assert.That(parameters).IsNotNull();
4949
await Assert.That(parameters!.TestRequiredString).IsEqualTo("something");
50+
await Assert.That(parameters.TestBool).IsTrue();
5051
}
5152
}

0 commit comments

Comments
 (0)