|
1 | 1 | using DotNetCampus.Cli.Tests.ParsingStyles; |
2 | 2 | using DotNetCampus.CommandLine.FakeObjects; |
3 | 3 | using Microsoft.VisualStudio.TestTools.UnitTesting; |
4 | | -using S = DotNetCampus.Cli.Tests.ParsingStyles.TestCommandLineStyle; |
5 | 4 |
|
6 | 5 | namespace DotNetCampus.Cli.Tests.CommandMatching; |
7 | 6 |
|
8 | 7 | [TestClass] |
9 | 8 | public class CommandAttributeTests |
10 | 9 | { |
11 | 10 | [TestMethod] |
12 | | - [DataRow(new[] { "--option=value" }, nameof(CommandObject0InAnotherAssembly), S.Flexible, DisplayName = "[Flexible]")] |
13 | | - [DataRow(new[] { "test", "--option=value" }, nameof(CommandObject1InAnotherAssembly), S.Flexible, DisplayName = "[Flexible]")] |
14 | | - [DataRow(new[] { "command", "in-another-assembly", "--option=value" }, nameof(CommandObject2InAnotherAssembly), S.Flexible, DisplayName = "[Flexible]")] |
15 | | - public void MatchCommand(string[] args, string expectedCommand, S style) |
| 11 | + [DataRow(new[] { "--option=value" }, nameof(CommandObject0InAnotherAssembly), TestCommandLineStyle.Flexible, |
| 12 | + DisplayName = "[Flexible] --option=value")] |
| 13 | + [DataRow(new[] { "test", "--option=value" }, nameof(CommandObject1InAnotherAssembly), TestCommandLineStyle.Flexible, |
| 14 | + DisplayName = "[Flexible] test --option=value")] |
| 15 | + [DataRow(new[] { "command", "in-another-assembly", "--option=value" }, nameof(CommandObject2InAnotherAssembly), TestCommandLineStyle.Flexible, |
| 16 | + DisplayName = "[Flexible] command in-another-assembly --option=value")] |
| 17 | + public void MatchCommand(string[] args, string expectedCommand, TestCommandLineStyle style) |
16 | 18 | { |
17 | 19 | // Arrange |
18 | 20 | (string? TypeName, string? Value) matched = default; |
|
0 commit comments