From d335b5de40161b52eea7a2852d98d3ff05f3c37e Mon Sep 17 00:00:00 2001 From: Zlatko Knezevic Date: Mon, 12 Dec 2016 23:29:29 -0800 Subject: [PATCH] Changing dotnet-test options (#4987) In Preview 3, the `dotnet test` options were not aligned with the CLI's adopted format. This PR changes the options to be aligned. Where possible/applicable, I have shortened the long options to a meaningful mnemonic short version. Fixes #4960 --- src/dotnet/commands/dotnet-test/LocalizableStrings.cs | 6 +++--- src/dotnet/commands/dotnet-test/Program.cs | 8 ++++---- .../GivenDotnetTestBuildsAndRunsTestfromCsproj.cs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dotnet/commands/dotnet-test/LocalizableStrings.cs b/src/dotnet/commands/dotnet-test/LocalizableStrings.cs index c0da93516..350aea866 100644 --- a/src/dotnet/commands/dotnet-test/LocalizableStrings.cs +++ b/src/dotnet/commands/dotnet-test/LocalizableStrings.cs @@ -20,11 +20,11 @@ public const string CmdTestCaseFilterDescription = @"Run tests that match the given expression. Examples: - --testCaseFilter:""Priority = 1"" - --testCaseFilter: ""(FullyQualifiedName~Nightly | Name = MyTestMethod)"""; + --test-case-filter:""Priority = 1"" + --test-case-filter: ""(FullyQualifiedName~Nightly | Name = MyTestMethod)"""; public const string CmdTestAdapterPathDescription = @"Use custom adapters from the given path in the test run. - Example: --testAdapterPath:"; + Example: --test-adapter-path:"; public const string CmdLoggerOption = "LoggerUri/FriendlyName"; diff --git a/src/dotnet/commands/dotnet-test/Program.cs b/src/dotnet/commands/dotnet-test/Program.cs index 8ff04db7a..533b27d1d 100644 --- a/src/dotnet/commands/dotnet-test/Program.cs +++ b/src/dotnet/commands/dotnet-test/Program.cs @@ -39,17 +39,17 @@ namespace Microsoft.DotNet.Tools.Test CommandOptionType.SingleValue); var listTestsOption = cmd.Option( - "-lt|--listTests", + "-t|--list-tests", LocalizableStrings.CmdListTestsDescription, CommandOptionType.NoValue); var testCaseFilterOption = cmd.Option( - $"-tcf|--testCaseFilter <{LocalizableStrings.CmdTestCaseFilterExpression}>", + $"--test-case-filter <{LocalizableStrings.CmdTestCaseFilterExpression}>", LocalizableStrings.CmdTestCaseFilterDescription, CommandOptionType.SingleValue); var testAdapterPathOption = cmd.Option( - "-tap|--testAdapterPath", + "-a|--test-adapter-path", LocalizableStrings.CmdTestAdapterPathDescription, CommandOptionType.SingleValue); @@ -79,7 +79,7 @@ namespace Microsoft.DotNet.Tools.Test CommandOptionType.SingleValue); var noBuildtOption = cmd.Option( - "--noBuild", + "--no-build", LocalizableStrings.CmdNoBuildDescription, CommandOptionType.NoValue); diff --git a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs index 47b95ab21..f468fa02f 100644 --- a/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs +++ b/test/dotnet-test.Tests/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs @@ -91,7 +91,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests // Call test CommandResult result = new DotnetTestCommand() .WithWorkingDirectory(testProjectDirectory) - .ExecuteWithCapturedOutput("--noBuild"); + .ExecuteWithCapturedOutput("--no-build"); // Verify result.StdOut.Should().Contain(expectedError);