Make dotnet.Tests pass on localized setup

This commit is contained in:
Nick Guerrera 2017-06-12 17:31:40 -07:00
parent a2a33591ce
commit f09124fcd6
6 changed files with 12 additions and 20 deletions

View file

@ -51,7 +51,7 @@ namespace Microsoft.DotNet.Tests
[Fact]
public void UsingDotnetForTheFirstTimeWithNonVerbsDoesNotPrintEula()
{
const string firstTimeNonVerbUseMessage = @".NET Command Line Tools";
string firstTimeNonVerbUseMessage = Cli.Utils.LocalizableStrings.DotNetCommandLineTools;
_firstDotnetNonVerbUseCommandResult.StdOut
.Should()
@ -61,21 +61,10 @@ namespace Microsoft.DotNet.Tests
[Fact]
public void ItShowsTheAppropriateMessageToTheUser()
{
string firstTimeUseWelcomeMessage = NormalizeLineEndings(@"Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The data is collected by Microsoft and shared with the community.
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.");
// normalizing line endings as git is occasionally replacing line endings in this file causing this test to fail
string firstTimeUseWelcomeMessage = NormalizeLineEndings(Configurer.LocalizableStrings.FirstTimeWelcomeMessage);
// normalizing line endings as what is used in the resources may
// does not necessarily match how the command stdout capturing logic
// handles newlines.
NormalizeLineEndings(_firstDotnetVerbUseCommandResult.StdOut)
.Should().Contain(firstTimeUseWelcomeMessage)
.And.NotContain("Restore completed in");