From 1dcdba7455ee61807e257f7a4ba5777975d56e68 Mon Sep 17 00:00:00 2001 From: Sarabjot Singh Date: Tue, 6 Mar 2018 23:01:25 +0530 Subject: [PATCH] Fixing the tests for string comparison issue. (#1462) --- .../Hosting/DefaultTestHostManagerTests.cs | 4 ++-- .../Processors/CLIRunSettingsArgumentProcessorTests.cs | 2 +- .../Processors/CollectArgumentProcessorTests.cs | 2 +- .../Processors/EnableLoggersArgumentProcessorTests.cs | 5 +++-- .../Processors/HelpArgumentProcessorTests.cs | 5 +++-- .../Processors/InIsolationArgumentProcessorTests.cs | 3 ++- .../Processors/ListTestsArgumentProcessorTests.cs | 2 +- .../Processors/ParallelArgumentProcessorTests.cs | 5 +++-- .../Processors/ParentProcessIdArgumentProcessorTests.cs | 2 +- .../Processors/PlatformArgumentProcessorTests.cs | 3 ++- .../Processors/PortArgumentProcessorTests.cs | 2 +- .../Processors/ResultsDirectoryArgumentProcessorTests.cs | 2 +- .../Processors/RunSettingsArgumentProcessorTests.cs | 2 +- .../Processors/RunSpecificTestsArgumentProcessorTests.cs | 2 +- .../Processors/RunTestsArgumentProcessorTests.cs | 2 +- .../Processors/TestAdapterPathArgumentProcessorTests.cs | 2 +- .../Processors/TestCaseFilterArgumentProcessorTests.cs | 2 +- 17 files changed, 26 insertions(+), 21 deletions(-) diff --git a/test/Microsoft.TestPlatform.TestHostProvider.UnitTests/Hosting/DefaultTestHostManagerTests.cs b/test/Microsoft.TestPlatform.TestHostProvider.UnitTests/Hosting/DefaultTestHostManagerTests.cs index 23da236bcf..bffb9f85bc 100644 --- a/test/Microsoft.TestPlatform.TestHostProvider.UnitTests/Hosting/DefaultTestHostManagerTests.cs +++ b/test/Microsoft.TestPlatform.TestHostProvider.UnitTests/Hosting/DefaultTestHostManagerTests.cs @@ -254,7 +254,7 @@ public void GetTestPlatformExtensionsShouldIncludeOutputDirectoryExtensionsIfTes // Verify List expectedList = new List { @"C:\Source2\ext1.TestAdapter.dll", @"C:\Source1\ext2.TestAdapter.dll" }; CollectionAssert.AreEqual(expectedList, resultExtensions); - this.mockMessageLogger.Verify(ml => ml.SendMessage(TestMessageLevel.Warning, "Multiple versions of same extension found. Selecting the highest version.\n ext1.TestAdapter : 2.2\n ext2.TestAdapter : 5.5"), Times.Once); + this.mockMessageLogger.Verify(ml => ml.SendMessage(TestMessageLevel.Warning, "Multiple versions of same extension found. Selecting the highest version." + Environment.NewLine + " ext1.TestAdapter : 2.2\n ext2.TestAdapter : 5.5"), Times.Once); } [TestMethod] @@ -279,7 +279,7 @@ public void GetTestPlatformExtensionsShouldReturnPathTheHigherVersionedFileExten // Verify CollectionAssert.AreEqual(extensionsList2, resultExtensions); - this.mockMessageLogger.Verify(ml => ml.SendMessage(TestMessageLevel.Warning, "Multiple versions of same extension found. Selecting the highest version.\n ext1.TestAdapter : 2.2"), Times.Once); + this.mockMessageLogger.Verify(ml => ml.SendMessage(TestMessageLevel.Warning, "Multiple versions of same extension found. Selecting the highest version." + Environment.NewLine + " ext1.TestAdapter : 2.2"), Times.Once); } [TestMethod] diff --git a/test/vstest.console.UnitTests/Processors/CLIRunSettingsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/CLIRunSettingsArgumentProcessorTests.cs index 632cae5aa3..9d8270cc2c 100644 --- a/test/vstest.console.UnitTests/Processors/CLIRunSettingsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/CLIRunSettingsArgumentProcessorTests.cs @@ -61,7 +61,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() var capabilities = new CLIRunSettingsArgumentProcessorCapabilities(); Assert.AreEqual("--", capabilities.CommandName); - Assert.AreEqual("RunSettings arguments:\n Arguments to pass runsettings configurations through commandline. Arguments may be specified as name-value pair of the form [name]=[value] after \"-- \". Note the space after --. \n Use a space to separate multiple [name]=[value].\n More info on RunSettings arguments support: https://aka.ms/vstest-runsettings-arguments", capabilities.HelpContentResourceName); + Assert.AreEqual("RunSettings arguments:" + Environment.NewLine + " Arguments to pass runsettings configurations through commandline. Arguments may be specified as name-value pair of the form [name]=[value] after \"-- \". Note the space after --. " + Environment.NewLine + " Use a space to separate multiple [name]=[value]." + Environment.NewLine + " More info on RunSettings arguments support: https://aka.ms/vstest-runsettings-arguments", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.CLIRunSettingsArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs index 58ecf0edc1..699a206403 100644 --- a/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/CollectArgumentProcessorTests.cs @@ -47,7 +47,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() var capabilities = new CollectArgumentProcessorCapabilities(); Assert.AreEqual("/Collect", capabilities.CommandName); - Assert.AreEqual("--Collect|/Collect:\n Enables data collector for the test run. More info here : https://aka.ms/vstest-collect", capabilities.HelpContentResourceName); + Assert.AreEqual("--Collect|/Collect:" + Environment.NewLine + " Enables data collector for the test run. More info here : https://aka.ms/vstest-collect", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.CollectArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/EnableLoggersArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/EnableLoggersArgumentProcessorTests.cs index 964d0197e7..4fc694f29b 100644 --- a/test/vstest.console.UnitTests/Processors/EnableLoggersArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/EnableLoggersArgumentProcessorTests.cs @@ -8,8 +8,9 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests.Processors using Microsoft.VisualStudio.TestTools.UnitTesting; using vstest.console.UnitTests.TestDoubles; + using System; using System.Linq; - + [TestClass] public class EnableLoggersArgumentProcessorTests { @@ -39,7 +40,7 @@ public void CapabilitiesShouldAppropriateProperties() { EnableLoggerArgumentProcessorCapabilities capabilities = new EnableLoggerArgumentProcessorCapabilities(); Assert.AreEqual("/Logger", capabilities.CommandName); - Assert.AreEqual("--logger|/logger:\n Specify a logger for test results. For example, to log results into a \n Visual Studio Test Results File (TRX) use /logger:trx[;LogFileName=]\n Creates file in TestResults directory with given LogFileName.\n\n Change the verbosity level in log messages for console logger as shown below\n Example: /logger:console;verbosity=\n Allowed values for verbosity: quiet, minimal and normal.\n\n Change the diagnostic level prefix for console logger as shown below\n Example: /logger:console;prefix=\n More info on Console Logger here : https://aka.ms/console-logger\n\n To publish test results to Team Foundation Server, use TfsPublisher as shown below\n Example: /logger:TfsPublisher;\n Collection=;\n BuildName=;\n TeamProject=\n [;Platform=]\n [;Flavor=]\n [;RunTitle=]", capabilities.HelpContentResourceName); + Assert.AreEqual("--logger|/logger:<Logger Uri/FriendlyName>" + Environment.NewLine + " Specify a logger for test results. For example, to log results into a " + Environment.NewLine + " Visual Studio Test Results File (TRX) use /logger:trx[;LogFileName=<Defaults to unique file name>]" + Environment.NewLine + " Creates file in TestResults directory with given LogFileName." + Environment.NewLine + Environment.NewLine + " Change the verbosity level in log messages for console logger as shown below" + Environment.NewLine + " Example: /logger:console;verbosity=<Defaults to \"minimal\">" + Environment.NewLine + " Allowed values for verbosity: quiet, minimal and normal." + Environment.NewLine + Environment.NewLine + " Change the diagnostic level prefix for console logger as shown below" + Environment.NewLine + " Example: /logger:console;prefix=<Defaults to \"false\">" + Environment.NewLine + " More info on Console Logger here : https://aka.ms/console-logger" + Environment.NewLine + Environment.NewLine + " To publish test results to Team Foundation Server, use TfsPublisher as shown below" + Environment.NewLine + " Example: /logger:TfsPublisher;" + Environment.NewLine + " Collection=<team project collection url>;" + Environment.NewLine + " BuildName=<build name>;" + Environment.NewLine + " TeamProject=<team project name>" + Environment.NewLine + " [;Platform=<Defaults to \"Any CPU\">]" + Environment.NewLine + " [;Flavor=<Defaults to \"Debug\">]" + Environment.NewLine + " [;RunTitle=<title>]", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.EnableLoggerArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/HelpArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/HelpArgumentProcessorTests.cs index a449ad286e..f32495b4b4 100644 --- a/test/vstest.console.UnitTests/Processors/HelpArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/HelpArgumentProcessorTests.cs @@ -3,6 +3,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests.Processors { + using System; using System.Collections.Generic; using Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; @@ -39,7 +40,7 @@ public void CapabilitiesShouldAppropriateProperties() { HelpArgumentProcessorCapabilities capabilities = new HelpArgumentProcessorCapabilities(); Assert.AreEqual("/Help", capabilities.CommandName); - Assert.AreEqual("-?|--Help|/?|/Help\n Display this usage message.", capabilities.HelpContentResourceName); + Assert.AreEqual("-?|--Help|/?|/Help" + Environment.NewLine + " Display this usage message.", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.HelpArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); @@ -71,7 +72,7 @@ public void ExecuterExecuteWritesAppropriateDataToConsole() Assert.IsTrue(output.Lines.Contains("Arguments:")); Assert.IsTrue(output.Lines.Contains("Options:")); Assert.IsTrue(output.Lines.Contains("Description: Runs tests from the specified files.")); - Assert.IsTrue(output.Lines.Contains(" To run tests:\n >vstest.console.exe tests.dll \n To run tests with additional settings such as data collectors:\n >vstest.console.exe tests.dll /Settings:Local.RunSettings")); + Assert.IsTrue(output.Lines.Contains(" To run tests:" + Environment.NewLine + " >vstest.console.exe tests.dll " + Environment.NewLine + " To run tests with additional settings such as data collectors:" + Environment.NewLine + " >vstest.console.exe tests.dll /Settings:Local.RunSettings")); } } diff --git a/test/vstest.console.UnitTests/Processors/InIsolationArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/InIsolationArgumentProcessorTests.cs index fcf342038a..f203945367 100644 --- a/test/vstest.console.UnitTests/Processors/InIsolationArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/InIsolationArgumentProcessorTests.cs @@ -6,6 +6,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests.Processors using Microsoft.VisualStudio.TestPlatform.CommandLine.Processors; using Microsoft.VisualStudio.TestPlatform.Common.Utilities; using Microsoft.VisualStudio.TestTools.UnitTesting; + using System; using vstest.console.UnitTests.Processors; using ExceptionUtilities = Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests.ExceptionUtilities; @@ -55,7 +56,7 @@ public void InIsolationArgumentProcessorMetadataShouldProvideAppropriateCapabili Assert.AreEqual(null, isolationProcessor.Metadata.Value.ShortCommandName); Assert.AreEqual(ArgumentProcessorPriority.AutoUpdateRunSettings, isolationProcessor.Metadata.Value.Priority); Assert.AreEqual(HelpContentPriority.InIsolationArgumentProcessorHelpPriority, isolationProcessor.Metadata.Value.HelpPriority); - Assert.AreEqual("--InIsolation|/InIsolation\n Runs the tests in an isolated process. This makes vstest.console.exe \n process less likely to be stopped on an error in the tests, but tests \n may run slower.", isolationProcessor.Metadata.Value.HelpContentResourceName); + Assert.AreEqual("--InIsolation|/InIsolation" + Environment.NewLine + " Runs the tests in an isolated process. This makes vstest.console.exe " + Environment.NewLine + " process less likely to be stopped on an error in the tests, but tests " + Environment.NewLine + " may run slower.", isolationProcessor.Metadata.Value.HelpContentResourceName); } [TestMethod] diff --git a/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs index 7a5b8a8d58..1b2660dd89 100644 --- a/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ListTestsArgumentProcessorTests.cs @@ -109,7 +109,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() var capabilities = new ListTestsArgumentProcessorCapabilities(); Assert.AreEqual("/ListTests", capabilities.CommandName); Assert.AreEqual("/lt", capabilities.ShortCommandName); - Assert.AreEqual("-lt|--ListTests|/lt|/ListTests:<File Name>\n Lists all discovered tests from the given test container.", capabilities.HelpContentResourceName); + Assert.AreEqual("-lt|--ListTests|/lt|/ListTests:<File Name>" + Environment.NewLine + " Lists all discovered tests from the given test container.", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.ListTestsArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(true, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/ParallelArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ParallelArgumentProcessorTests.cs index 51b3205032..b8728460ff 100644 --- a/test/vstest.console.UnitTests/Processors/ParallelArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ParallelArgumentProcessorTests.cs @@ -3,10 +3,11 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests.Processors { + using System; + using Microsoft.VisualStudio.TestPlatform.Common.Utilities; using Microsoft.VisualStudio.TestTools.UnitTesting; using TestPlatform.CommandLine.Processors; using vstest.console.UnitTests.Processors; - using Microsoft.VisualStudio.TestPlatform.Common.Utilities; using ExceptionUtilities = Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests.ExceptionUtilities; @@ -49,7 +50,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() { var capabilities = new ParallelArgumentProcessorCapabilities(); Assert.AreEqual("/Parallel", capabilities.CommandName); - Assert.AreEqual("--Parallel|/Parallel\n Specifies that the tests be executed in parallel. By default up\n to all available cores on the machine may be used.\n The number of cores to use may be configured using a settings file.", capabilities.HelpContentResourceName); + Assert.AreEqual("--Parallel|/Parallel" + Environment.NewLine + " Specifies that the tests be executed in parallel. By default up" + Environment.NewLine + " to all available cores on the machine may be used." + Environment.NewLine + " The number of cores to use may be configured using a settings file.", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.ParallelArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/ParentProcessIdArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ParentProcessIdArgumentProcessorTests.cs index c093e962da..64962e696c 100644 --- a/test/vstest.console.UnitTests/Processors/ParentProcessIdArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ParentProcessIdArgumentProcessorTests.cs @@ -39,7 +39,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() { var capabilities = new ParentProcessIdArgumentProcessorCapabilities(); Assert.AreEqual("/ParentProcessId", capabilities.CommandName); - Assert.AreEqual("--ParentProcessId|/ParentProcessId:<ParentProcessId>\n Process Id of the Parent Process responsible for launching current process.", capabilities.HelpContentResourceName); + Assert.AreEqual("--ParentProcessId|/ParentProcessId:<ParentProcessId>" + Environment.NewLine + " Process Id of the Parent Process responsible for launching current process.", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.ParentProcessIdArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs index 08ef68b3ed..60783552e1 100644 --- a/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/PlatformArgumentProcessorTests.cs @@ -3,6 +3,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CommandLine.UnitTests.Processors { + using System; using Microsoft.VisualStudio.TestTools.UnitTesting; using TestPlatform.CommandLine.Processors; using vstest.console.UnitTests.Processors; @@ -49,7 +50,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() { var capabilities = new PlatformArgumentProcessorCapabilities(); Assert.AreEqual("/Platform", capabilities.CommandName); - Assert.AreEqual("--Platform|/Platform:<Platform type>\n Target platform architecture to be used for test execution. \n Valid values are x86, x64 and ARM.", capabilities.HelpContentResourceName); + Assert.AreEqual("--Platform|/Platform:<Platform type>" + Environment.NewLine + " Target platform architecture to be used for test execution. " + Environment.NewLine + " Valid values are x86, x64 and ARM.", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.PlatformArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/PortArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/PortArgumentProcessorTests.cs index 897ea3cb4e..963fa695ea 100644 --- a/test/vstest.console.UnitTests/Processors/PortArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/PortArgumentProcessorTests.cs @@ -50,7 +50,7 @@ public void CapabilitiesShouldAppropriateProperties() { var capabilities = new PortArgumentProcessorCapabilities(); Assert.AreEqual("/Port", capabilities.CommandName); - Assert.AreEqual("--Port|/Port:<Port>\n The Port for socket connection and receiving the event messages.", capabilities.HelpContentResourceName); + Assert.AreEqual("--Port|/Port:<Port>" + Environment.NewLine + " The Port for socket connection and receiving the event messages.", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.PortArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/ResultsDirectoryArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/ResultsDirectoryArgumentProcessorTests.cs index f6f4dde808..a96fd66d6b 100644 --- a/test/vstest.console.UnitTests/Processors/ResultsDirectoryArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/ResultsDirectoryArgumentProcessorTests.cs @@ -50,7 +50,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() { var capabilities = new ResultsDirectoryArgumentProcessorCapabilities(); Assert.AreEqual("/ResultsDirectory", capabilities.CommandName); - Assert.AreEqual("--ResultsDirectory|/ResultsDirectory\n Test results directory will be created in specified path if not exists.\n Example /ResultsDirectory:<pathToResultsDirectory>", capabilities.HelpContentResourceName); + Assert.AreEqual("--ResultsDirectory|/ResultsDirectory" + Environment.NewLine + " Test results directory will be created in specified path if not exists." + Environment.NewLine + " Example /ResultsDirectory:<pathToResultsDirectory>", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.ResultsDirectoryArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/RunSettingsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/RunSettingsArgumentProcessorTests.cs index 50da72420a..c3a41188e6 100644 --- a/test/vstest.console.UnitTests/Processors/RunSettingsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/RunSettingsArgumentProcessorTests.cs @@ -58,7 +58,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() { var capabilities = new RunSettingsArgumentProcessorCapabilities(); Assert.AreEqual("/Settings", capabilities.CommandName); - Assert.AreEqual("--Settings|/Settings:<Settings File>\n Settings to use when running tests.", capabilities.HelpContentResourceName); + Assert.AreEqual("--Settings|/Settings:<Settings File>" + Environment.NewLine + " Settings to use when running tests.", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.RunSettingsArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs index b2c2f55b87..ba93d66308 100644 --- a/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/RunSpecificTestsArgumentProcessorTests.cs @@ -87,7 +87,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() { RunSpecificTestsArgumentProcessorCapabilities capabilities = new RunSpecificTestsArgumentProcessorCapabilities(); Assert.AreEqual("/Tests", capabilities.CommandName); - StringAssert.Contains(capabilities.HelpContentResourceName, "/Tests:<Test Names>\n Run tests with names that match the provided values."); + StringAssert.Contains(capabilities.HelpContentResourceName, "/Tests:<Test Names>" + Environment.NewLine + " Run tests with names that match the provided values."); Assert.AreEqual(HelpContentPriority.RunSpecificTestsArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(true, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs index 1e7c342768..47be5af8ef 100644 --- a/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/RunTestsArgumentProcessorTests.cs @@ -86,7 +86,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() { RunTestsArgumentProcessorCapabilities capabilities = new RunTestsArgumentProcessorCapabilities(); Assert.AreEqual("/RunTests", capabilities.CommandName); - Assert.AreEqual("[TestFileNames]\n Run tests from the specified files. Separate multiple test file names\n by spaces.\n Examples: mytestproject.dll\n mytestproject.dll myothertestproject.exe", capabilities.HelpContentResourceName); + Assert.AreEqual("[TestFileNames]" + Environment.NewLine + " Run tests from the specified files. Separate multiple test file names" + Environment.NewLine + " by spaces." + Environment.NewLine + " Examples: mytestproject.dll" + Environment.NewLine + " mytestproject.dll myothertestproject.exe", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.RunTestsArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(true, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/TestAdapterPathArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/TestAdapterPathArgumentProcessorTests.cs index c75983ffc7..b8a7d268e1 100644 --- a/test/vstest.console.UnitTests/Processors/TestAdapterPathArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/TestAdapterPathArgumentProcessorTests.cs @@ -59,7 +59,7 @@ public void CapabilitiesShouldReturnAppropriateProperties() { var capabilities = new TestAdapterPathArgumentProcessorCapabilities(); Assert.AreEqual("/TestAdapterPath", capabilities.CommandName); - Assert.AreEqual("--TestAdapterPath|/TestAdapterPath\n This makes vstest.console.exe process use custom test adapters\n from a given path (if any) in the test run. \n Example /TestAdapterPath:<pathToCustomAdapters>", capabilities.HelpContentResourceName); + Assert.AreEqual("--TestAdapterPath|/TestAdapterPath" + Environment.NewLine + " This makes vstest.console.exe process use custom test adapters" + Environment.NewLine + " from a given path (if any) in the test run. " + Environment.NewLine + " Example /TestAdapterPath:<pathToCustomAdapters>", capabilities.HelpContentResourceName); Assert.AreEqual(HelpContentPriority.TestAdapterPathArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction); diff --git a/test/vstest.console.UnitTests/Processors/TestCaseFilterArgumentProcessorTests.cs b/test/vstest.console.UnitTests/Processors/TestCaseFilterArgumentProcessorTests.cs index a9ca9b16c5..878e7ecf97 100644 --- a/test/vstest.console.UnitTests/Processors/TestCaseFilterArgumentProcessorTests.cs +++ b/test/vstest.console.UnitTests/Processors/TestCaseFilterArgumentProcessorTests.cs @@ -33,7 +33,7 @@ public void CapabilitiesShouldAppropriateProperties() { TestCaseFilterArgumentProcessorCapabilities capabilities = new TestCaseFilterArgumentProcessorCapabilities(); Assert.AreEqual("/TestCaseFilter", capabilities.CommandName); - StringAssert.Contains(capabilities.HelpContentResourceName, "/TestCaseFilter:<Expression>\n Run tests that match the given expression.\n <Expression> is of the format <property>Operator<value>[|&<Expression>]"); + StringAssert.Contains(capabilities.HelpContentResourceName, "/TestCaseFilter:<Expression>" + Environment.NewLine + " Run tests that match the given expression." + Environment.NewLine + " <Expression> is of the format <property>Operator<value>[|&<Expression>]"); Assert.AreEqual(HelpContentPriority.TestCaseFilterArgumentProcessorHelpPriority, capabilities.HelpPriority); Assert.AreEqual(false, capabilities.IsAction);