mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Add even more tests for CommandSchemaResolver
This commit is contained in:
@@ -10,6 +10,8 @@ namespace CliFx.Tests
|
||||
[Command("cmd", Description = "NormalCommand1 description.")]
|
||||
private class NormalCommand1 : ICommand
|
||||
{
|
||||
public string NotAnOption { get; set; }
|
||||
|
||||
[CommandOption("option-a", 'a')]
|
||||
public int OptionA { get; set; }
|
||||
|
||||
@@ -47,7 +49,12 @@ namespace CliFx.Tests
|
||||
}
|
||||
|
||||
[Command]
|
||||
private class InvalidCommand1 : ICommand
|
||||
private class InvalidCommand1
|
||||
{
|
||||
}
|
||||
|
||||
[Command]
|
||||
private class InvalidCommand2 : ICommand
|
||||
{
|
||||
[CommandOption("conflict")]
|
||||
public string ConflictingOption1 { get; set; }
|
||||
@@ -59,7 +66,7 @@ namespace CliFx.Tests
|
||||
}
|
||||
|
||||
[Command]
|
||||
private class InvalidCommand2 : ICommand
|
||||
private class InvalidCommand3 : ICommand
|
||||
{
|
||||
[CommandOption('c')]
|
||||
public string ConflictingOption1 { get; set; }
|
||||
|
||||
@@ -58,6 +58,11 @@ namespace CliFx.Tests
|
||||
{
|
||||
new[] {typeof(InvalidCommand2)}
|
||||
});
|
||||
|
||||
yield return new TestCaseData(new object[]
|
||||
{
|
||||
new[] {typeof(InvalidCommand3)}
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
Reference in New Issue
Block a user