Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 6b0cd0e

Browse files
committed
Make configurer unit tests pass on localized setup
1 parent 1661fd0 commit 6b0cd0e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/Microsoft.DotNet.Configurer.UnitTests/GivenADotnetFirstTimeUseConfigurer.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void It_does_not_print_the_first_time_use_notice_if_the_sentinel_exists()
5252

5353
dotnetFirstTimeUseConfigurer.Configure();
5454

55-
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str.StartsWith("Welcome to .NET Core!"))), Times.Never);
55+
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str == LocalizableStrings.FirstTimeWelcomeMessage)), Times.Never);
5656
_reporterMock.Verify(r => r.Write(It.IsAny<string>()), Times.Never);
5757
}
5858

@@ -74,7 +74,7 @@ public void It_does_not_print_the_first_time_use_notice_when_the_user_has_set_th
7474

7575
dotnetFirstTimeUseConfigurer.Configure();
7676

77-
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str.StartsWith("Welcome to .NET Core!"))), Times.Never);
77+
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str == LocalizableStrings.FirstTimeWelcomeMessage)), Times.Never);
7878
_reporterMock.Verify(r => r.Write(It.IsAny<string>()), Times.Never);
7979
}
8080

@@ -96,7 +96,7 @@ public void It_does_not_print_the_first_time_use_notice_when_the_user_has_set_th
9696

9797
dotnetFirstTimeUseConfigurer.Configure();
9898

99-
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str.StartsWith("Welcome to .NET Core!"))), Times.Never);
99+
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str == LocalizableStrings.FirstTimeWelcomeMessage)), Times.Never);
100100
_reporterMock.Verify(r => r.Write(It.IsAny<string>()), Times.Never);
101101
}
102102

@@ -115,7 +115,7 @@ public void It_prints_the_telemetry_if_the_sentinel_does_not_exist()
115115

116116
dotnetFirstTimeUseConfigurer.Configure();
117117

118-
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str.StartsWith("Welcome to .NET Core!"))));
118+
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str == LocalizableStrings.FirstTimeWelcomeMessage)));
119119
_reporterMock.Verify(r => r.Write(It.IsAny<string>()), Times.Never);
120120
}
121121

@@ -228,8 +228,8 @@ public void It_prints_first_use_notice_and_primes_the_cache_if_the_sentinels_do_
228228

229229
dotnetFirstTimeUseConfigurer.Configure();
230230

231-
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str.StartsWith("Welcome to .NET Core!"))));
232-
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str.StartsWith("Configuring"))));
231+
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str == LocalizableStrings.FirstTimeWelcomeMessage)));
232+
_reporterMock.Verify(r => r.WriteLine(It.Is<string>(str => str == LocalizableStrings.NugetCachePrimeMessage)));
233233
_nugetCachePrimerMock.Verify(r => r.PrimeCache(), Times.Once);
234234
_reporterMock.Verify(r => r.Write(It.IsAny<string>()), Times.Never);
235235
}

0 commit comments

Comments
 (0)