From 6b0cd0e52fad355e327a130fbcc9464e00010a84 Mon Sep 17 00:00:00 2001 From: Nick Guerrera Date: Wed, 21 Jun 2017 12:44:17 -0700 Subject: [PATCH] Make configurer unit tests pass on localized setup --- .../GivenADotnetFirstTimeUseConfigurer.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs b/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs index 9b951da34..24ed0a67e 100644 --- a/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs +++ b/test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs @@ -52,7 +52,7 @@ namespace Microsoft.DotNet.Configurer.UnitTests dotnetFirstTimeUseConfigurer.Configure(); - _reporterMock.Verify(r => r.WriteLine(It.Is(str => str.StartsWith("Welcome to .NET Core!"))), Times.Never); + _reporterMock.Verify(r => r.WriteLine(It.Is(str => str == LocalizableStrings.FirstTimeWelcomeMessage)), Times.Never); _reporterMock.Verify(r => r.Write(It.IsAny()), Times.Never); } @@ -74,7 +74,7 @@ namespace Microsoft.DotNet.Configurer.UnitTests dotnetFirstTimeUseConfigurer.Configure(); - _reporterMock.Verify(r => r.WriteLine(It.Is(str => str.StartsWith("Welcome to .NET Core!"))), Times.Never); + _reporterMock.Verify(r => r.WriteLine(It.Is(str => str == LocalizableStrings.FirstTimeWelcomeMessage)), Times.Never); _reporterMock.Verify(r => r.Write(It.IsAny()), Times.Never); } @@ -96,7 +96,7 @@ namespace Microsoft.DotNet.Configurer.UnitTests dotnetFirstTimeUseConfigurer.Configure(); - _reporterMock.Verify(r => r.WriteLine(It.Is(str => str.StartsWith("Welcome to .NET Core!"))), Times.Never); + _reporterMock.Verify(r => r.WriteLine(It.Is(str => str == LocalizableStrings.FirstTimeWelcomeMessage)), Times.Never); _reporterMock.Verify(r => r.Write(It.IsAny()), Times.Never); } @@ -115,7 +115,7 @@ namespace Microsoft.DotNet.Configurer.UnitTests dotnetFirstTimeUseConfigurer.Configure(); - _reporterMock.Verify(r => r.WriteLine(It.Is(str => str.StartsWith("Welcome to .NET Core!")))); + _reporterMock.Verify(r => r.WriteLine(It.Is(str => str == LocalizableStrings.FirstTimeWelcomeMessage))); _reporterMock.Verify(r => r.Write(It.IsAny()), Times.Never); } @@ -228,8 +228,8 @@ namespace Microsoft.DotNet.Configurer.UnitTests dotnetFirstTimeUseConfigurer.Configure(); - _reporterMock.Verify(r => r.WriteLine(It.Is(str => str.StartsWith("Welcome to .NET Core!")))); - _reporterMock.Verify(r => r.WriteLine(It.Is(str => str.StartsWith("Configuring")))); + _reporterMock.Verify(r => r.WriteLine(It.Is(str => str == LocalizableStrings.FirstTimeWelcomeMessage))); + _reporterMock.Verify(r => r.WriteLine(It.Is(str => str == LocalizableStrings.NugetCachePrimeMessage))); _nugetCachePrimerMock.Verify(r => r.PrimeCache(), Times.Once); _reporterMock.Verify(r => r.Write(It.IsAny()), Times.Never); }