Add even more tests for CommandSchemaResolver

This commit is contained in:
Alexey Golub
2019-08-19 23:23:40 +03:00
parent 43e3042bac
commit 89cc3c8785
2 changed files with 14 additions and 2 deletions

View File

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

View File

@@ -58,6 +58,11 @@ namespace CliFx.Tests
{
new[] {typeof(InvalidCommand2)}
});
yield return new TestCaseData(new object[]
{
new[] {typeof(InvalidCommand3)}
});
}
[Test]