@@ -76,6 +76,15 @@ public void ItShowsTheAppropriateMessageToTheUser()
7676 . And . NotContain ( "Restore completed in" ) ;
7777 }
7878
79+ [ Fact ]
80+ public void ItShowsTheAspNetCertificateGenerationMessageToTheUser ( )
81+ {
82+ _firstDotnetVerbUseCommandResult . StdOut
83+ . Should ( )
84+ . ContainVisuallySameFragment ( Configurer . LocalizableStrings . AspNetCertificateInstalled )
85+ . And . NotContain ( "Restore completed in" ) ;
86+ }
87+
7988 [ Fact ]
8089 public void ItCreatesASentinelFileUnderTheNuGetCacheFolder ( )
8190 {
@@ -93,7 +102,15 @@ public void ItCreatesAFirstUseSentinelFileUnderTheDotDotNetFolder()
93102 }
94103
95104 [ Fact ]
96- public void ItDoesNotCreateAFirstUseSentinelFileUnderTheDotDotNetFolderWhenInternalReportInstallSuccessIsInvoked ( )
105+ public void ItCreatesAnAspNetCertificateSentinelFileUnderTheDotDotNetFolder ( )
106+ {
107+ _dotDotnetFolder
108+ . Should ( )
109+ . HaveFile ( $ "{ GetDotnetVersion ( ) } .aspNetCertificateSentinel") ;
110+ }
111+
112+ [ Fact ]
113+ public void ItDoesNotCreateAFirstUseSentinelFileNorAnAspNetCertificateSentinelFileUnderTheDotDotNetFolderWhenInternalReportInstallSuccessIsInvoked ( )
97114 {
98115 var emptyHome = Path . Combine ( _testDirectory , "empty_home" ) ;
99116 var profiled = Path . Combine ( _testDirectory , "profile.d" ) ;
@@ -117,6 +134,7 @@ public void ItDoesNotCreateAFirstUseSentinelFileUnderTheDotDotNetFolderWhenInter
117134 var homeFolder = new DirectoryInfo ( Path . Combine ( emptyHome , ".dotnet" ) ) ;
118135 string [ ] fileEntries = Directory . GetFiles ( homeFolder . ToString ( ) ) ;
119136 fileEntries . Should ( ) . OnlyContain ( x => ! x . Contains ( ".dotnetFirstUseSentinel" ) ) ;
137+ fileEntries . Should ( ) . OnlyContain ( x => ! x . Contains ( ".aspNetCertificateSentinel" ) ) ;
120138 }
121139
122140 [ Fact ]
@@ -147,6 +165,34 @@ public void ItShowsTheTelemetryNoticeWhenInvokingACommandAfterInternalReportInst
147165 . ContainVisuallySameFragment ( Configurer . LocalizableStrings . FirstTimeWelcomeMessage ) ;
148166 }
149167
168+ [ Fact ]
169+ public void ItShowsTheAspNetCertificateGenerationMessageWhenInvokingACommandAfterInternalReportInstallSuccessHasBeenInvoked ( )
170+ {
171+ var newHome = Path . Combine ( _testDirectory , "aspnet_home" ) ;
172+ var newHomeFolder = new DirectoryInfo ( Path . Combine ( newHome , ".dotnet" ) ) ;
173+ var profiled = Path . Combine ( _testDirectory , "profile.d" ) ;
174+ var pathsd = Path . Combine ( _testDirectory , "paths.d" ) ;
175+
176+ var command = new DotnetCommand ( )
177+ . WithWorkingDirectory ( _testDirectory ) ;
178+ command . Environment [ "HOME" ] = newHome ;
179+ command . Environment [ "USERPROFILE" ] = newHome ;
180+ command . Environment [ "APPDATA" ] = newHome ;
181+ command . Environment [ "DOTNET_CLI_TEST_FALLBACKFOLDER" ] = _nugetFallbackFolder . FullName ;
182+ command . Environment [ "DOTNET_CLI_TEST_LINUX_PROFILED_PATH" ] = profiled ;
183+ command . Environment [ "DOTNET_CLI_TEST_OSX_PATHSD_PATH" ] = pathsd ;
184+ command . Environment [ "DOTNET_SKIP_FIRST_TIME_EXPERIENCE" ] = "" ;
185+ command . Environment [ "SkipInvalidConfigurations" ] = "true" ;
186+
187+ command . ExecuteWithCapturedOutput ( "internal-reportinstallsuccess test" ) . Should ( ) . Pass ( ) ;
188+
189+ var result = command . ExecuteWithCapturedOutput ( "new --debug:ephemeral-hive" ) ;
190+
191+ result . StdOut
192+ . Should ( )
193+ . ContainVisuallySameFragment ( Configurer . LocalizableStrings . AspNetCertificateInstalled ) ;
194+ }
195+
150196 [ Fact ]
151197 public void ItRestoresTheNuGetPackagesToTheNuGetCacheFolder ( )
152198 {
0 commit comments