Addressed livar PR comment

This commit is contained in:
Faizan Ahmad 2016-10-12 15:20:07 +05:30
parent 391fff1f20
commit 4dd685a45c
2 changed files with 19 additions and 23 deletions

View file

@ -32,57 +32,53 @@ namespace Microsoft.DotNet.Tools.Test3
multipleValues: false); multipleValues: false);
var settingOption = cmd.Option( var settingOption = cmd.Option(
"--settings <SettingsFile>", "-s|--settings <SettingsFile>",
"Settings to use when running tests." + Environment.NewLine, "Settings to use when running tests.",
CommandOptionType.SingleValue); CommandOptionType.SingleValue);
var listTestsOption = cmd.Option( var listTestsOption = cmd.Option(
"-lt|--listTests", "-lt|--listTests",
@"Lists discovered tests" + Environment.NewLine, @"Lists discovered tests",
CommandOptionType.NoValue); CommandOptionType.NoValue);
var testCaseFilterOption = cmd.Option( var testCaseFilterOption = cmd.Option(
"--testCaseFilter <Expression>", "-tcf|--testCaseFilter <Expression>",
@"Run tests that match the given expression. @"Run tests that match the given expression.
<Expression> is of the format <property>Operator<value>[|&<Expression>] Examples:
where Operator is one of =, != or ~ (Operator ~ has 'contains' --testCaseFilter:""Priority = 1""
semantics and is applicable for string properties like DisplayName). --testCaseFilter: ""(FullyQualifiedName~Nightly | Name = MyTestMethod)""",
Parenthesis () can be used to group sub-expressions.
Examples: --testCaseFilter:""Priority = 1""
--testCaseFilter:""(FullyQualifiedName~Nightly | Name = MyTestMethod)""" + Environment.NewLine,
CommandOptionType.SingleValue); CommandOptionType.SingleValue);
var testAdapterPathOption = cmd.Option( var testAdapterPathOption = cmd.Option(
"--testAdapterPath", "-tap|--testAdapterPath",
@"This makes vstest.console.exe process use custom test adapters @"Use custom adapters from the given path in the test run.
from a given path (if any) in the test run. Example: --testAdapterPath:<pathToCustomAdapters>",
Example --testAdapterPath:<pathToCustomAdapters>" + Environment.NewLine,
CommandOptionType.SingleValue); CommandOptionType.SingleValue);
var loggerOption = cmd.Option( var loggerOption = cmd.Option(
"--logger <LoggerUri/FriendlyName>", "-l|--logger <LoggerUri/FriendlyName>",
@"Specify a logger for test results. For example, to log results into a @"Specify a logger for test results.
Visual Studio Test Results File(TRX) use --logger:trx" + Environment.NewLine, Example: --logger:trx",
CommandOptionType.SingleValue); CommandOptionType.SingleValue);
var configurationOption = cmd.Option( var configurationOption = cmd.Option(
"-c|--Configuration <Configuration>", "-c|--Configuration <Configuration>",
@"Configuration under which to build, i.e. Debug/Release" + Environment.NewLine, @"Configuration under which to build, i.e. Debug/Release",
CommandOptionType.SingleValue); CommandOptionType.SingleValue);
var frameworkOption = cmd.Option( var frameworkOption = cmd.Option(
"--framework <FrameworkVersion>", "-f|--framework <FrameworkVersion>",
@"Looks for test binaries for a specific framework" + Environment.NewLine, @"Looks for test binaries for a specific framework",
CommandOptionType.SingleValue); CommandOptionType.SingleValue);
var outputOption = cmd.Option( var outputOption = cmd.Option(
"-o|--output <OotputDir>", "-o|--output <OotputDir>",
@"Directory in which to find the binaries to be run" + Environment.NewLine, @"Directory in which to find the binaries to be run",
CommandOptionType.SingleValue); CommandOptionType.SingleValue);
var noBuildtOption = cmd.Option( var noBuildtOption = cmd.Option(
"--noBuild", "--noBuild",
@"Do not build project before testing." + Environment.NewLine, @"Do not build project before testing.",
CommandOptionType.NoValue); CommandOptionType.NoValue);
cmd.OnExecute(() => cmd.OnExecute(() =>

View file

@ -9,7 +9,7 @@ using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Cli.Test3.Tests namespace Microsoft.DotNet.Cli.Test3.Tests
{ {
public class Test3Tests : TestBase public class GivenDotnetTest3BuildsAndRunsTestfromCsproj : TestBase
{ {
[Fact] [Fact]
public void TestsFromAGivenProjectShouldRunWithExpectedOutput() public void TestsFromAGivenProjectShouldRunWithExpectedOutput()