From 4dd685a45c514fa8c89e5beff9ec72a4a90eb263 Mon Sep 17 00:00:00 2001 From: Faizan Ahmad Date: Wed, 12 Oct 2016 15:20:07 +0530 Subject: [PATCH] Addressed livar PR comment --- src/dotnet/commands/dotnet-test3/Program.cs | 40 +++++++++---------- ...DotnetTest3BuildsAndRunsTestfromCsproj.cs} | 2 +- 2 files changed, 19 insertions(+), 23 deletions(-) rename test/dotnet-test3.Tests/{Test3Tests.cs => GivenDotnetTest3BuildsAndRunsTestfromCsproj.cs} (95%) diff --git a/src/dotnet/commands/dotnet-test3/Program.cs b/src/dotnet/commands/dotnet-test3/Program.cs index 578d520b9..fe76e9e73 100644 --- a/src/dotnet/commands/dotnet-test3/Program.cs +++ b/src/dotnet/commands/dotnet-test3/Program.cs @@ -32,57 +32,53 @@ namespace Microsoft.DotNet.Tools.Test3 multipleValues: false); var settingOption = cmd.Option( - "--settings ", - "Settings to use when running tests." + Environment.NewLine, + "-s|--settings ", + "Settings to use when running tests.", CommandOptionType.SingleValue); var listTestsOption = cmd.Option( "-lt|--listTests", - @"Lists discovered tests" + Environment.NewLine, + @"Lists discovered tests", CommandOptionType.NoValue); var testCaseFilterOption = cmd.Option( - "--testCaseFilter ", + "-tcf|--testCaseFilter ", @"Run tests that match the given expression. - is of the format Operator[|&] - where Operator is one of =, != or ~ (Operator ~ has 'contains' - semantics and is applicable for string properties like DisplayName). - Parenthesis () can be used to group sub-expressions. - Examples: --testCaseFilter:""Priority = 1"" - --testCaseFilter:""(FullyQualifiedName~Nightly | Name = MyTestMethod)""" + Environment.NewLine, + Examples: + --testCaseFilter:""Priority = 1"" + --testCaseFilter: ""(FullyQualifiedName~Nightly | Name = MyTestMethod)""", CommandOptionType.SingleValue); var testAdapterPathOption = cmd.Option( - "--testAdapterPath", - @"This makes vstest.console.exe process use custom test adapters - from a given path (if any) in the test run. - Example --testAdapterPath:" + Environment.NewLine, + "-tap|--testAdapterPath", + @"Use custom adapters from the given path in the test run. + Example: --testAdapterPath:", CommandOptionType.SingleValue); var loggerOption = cmd.Option( - "--logger ", - @"Specify a logger for test results. For example, to log results into a - Visual Studio Test Results File(TRX) use --logger:trx" + Environment.NewLine, + "-l|--logger ", + @"Specify a logger for test results. + Example: --logger:trx", CommandOptionType.SingleValue); var configurationOption = cmd.Option( "-c|--Configuration ", - @"Configuration under which to build, i.e. Debug/Release" + Environment.NewLine, + @"Configuration under which to build, i.e. Debug/Release", CommandOptionType.SingleValue); var frameworkOption = cmd.Option( - "--framework ", - @"Looks for test binaries for a specific framework" + Environment.NewLine, + "-f|--framework ", + @"Looks for test binaries for a specific framework", CommandOptionType.SingleValue); var outputOption = cmd.Option( "-o|--output ", - @"Directory in which to find the binaries to be run" + Environment.NewLine, + @"Directory in which to find the binaries to be run", CommandOptionType.SingleValue); var noBuildtOption = cmd.Option( "--noBuild", - @"Do not build project before testing." + Environment.NewLine, + @"Do not build project before testing.", CommandOptionType.NoValue); cmd.OnExecute(() => diff --git a/test/dotnet-test3.Tests/Test3Tests.cs b/test/dotnet-test3.Tests/GivenDotnetTest3BuildsAndRunsTestfromCsproj.cs similarity index 95% rename from test/dotnet-test3.Tests/Test3Tests.cs rename to test/dotnet-test3.Tests/GivenDotnetTest3BuildsAndRunsTestfromCsproj.cs index 97adbbc49..f737027d2 100644 --- a/test/dotnet-test3.Tests/Test3Tests.cs +++ b/test/dotnet-test3.Tests/GivenDotnetTest3BuildsAndRunsTestfromCsproj.cs @@ -9,7 +9,7 @@ using Microsoft.DotNet.Cli.Utils; namespace Microsoft.DotNet.Cli.Test3.Tests { - public class Test3Tests : TestBase + public class GivenDotnetTest3BuildsAndRunsTestfromCsproj : TestBase { [Fact] public void TestsFromAGivenProjectShouldRunWithExpectedOutput()