Pipe character for listing options - Fully implemented and tested.

This commit is contained in:
Frank Ray
2024-03-18 13:03:19 +00:00
committed by Patrik Svensson
parent e66d3aab2e
commit 43f9ae92ad
11 changed files with 55 additions and 14 deletions

View File

@ -23,14 +23,16 @@ public sealed partial class CommandOptionAttributeTests
}
[Theory]
[InlineData("<VALUE>")]
public void Should_Parse_Value_Correctly(string value)
[InlineData("<VALUE>", "VALUE")]
[InlineData("<VALUE1>", "VALUE1")]
[InlineData("<VALUE1|VALUE2>", "VALUE1|VALUE2")]
public void Should_Parse_Value_Correctly(string value, string expected)
{
// Given, When
var option = new CommandOptionAttribute($"-o|--option {value}");
// Then
option.ValueName.ShouldBe("VALUE");
option.ValueName.ShouldBe(expected);
}
[Fact]