@@ -13,7 +13,7 @@ public class ConsoleInteractionServiceTests
1313 public async Task PromptForSelectionAsync_EmptyChoices_ThrowsEmptyChoicesException ( )
1414 {
1515 // Arrange
16- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
16+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
1717 var interactionService = new ConsoleInteractionService ( AnsiConsole . Console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
1818 var choices = Array . Empty < string > ( ) ;
1919
@@ -26,7 +26,7 @@ await Assert.ThrowsAsync<EmptyChoicesException>(() =>
2626 public async Task PromptForSelectionsAsync_EmptyChoices_ThrowsEmptyChoicesException ( )
2727 {
2828 // Arrange
29- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
29+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
3030 var interactionService = new ConsoleInteractionService ( AnsiConsole . Console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
3131 var choices = Array . Empty < string > ( ) ;
3232
@@ -47,7 +47,7 @@ public void DisplayError_WithMarkupCharacters_DoesNotCauseMarkupParsingError()
4747 Out = new AnsiConsoleOutput ( new StringWriter ( output ) )
4848 } ) ;
4949
50- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
50+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
5151 var interactionService = new ConsoleInteractionService ( console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
5252 var errorMessage = "The JSON value could not be converted to <Type>. Path: $.values[0].Type | LineNumber: 0 | BytePositionInLine: 121." ;
5353
@@ -72,7 +72,7 @@ public void DisplaySubtleMessage_WithMarkupCharacters_DoesNotCauseMarkupParsingE
7272 Out = new AnsiConsoleOutput ( new StringWriter ( output ) )
7373 } ) ;
7474
75- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
75+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
7676 var interactionService = new ConsoleInteractionService ( console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
7777 var message = "Path with <brackets> and [markup] characters" ;
7878
@@ -97,7 +97,7 @@ public void DisplayLines_WithMarkupCharacters_DoesNotCauseMarkupParsingError()
9797 Out = new AnsiConsoleOutput ( new StringWriter ( output ) )
9898 } ) ;
9999
100- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
100+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
101101 var interactionService = new ConsoleInteractionService ( console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
102102 var lines = new [ ]
103103 {
@@ -128,7 +128,7 @@ public void DisplayMarkdown_WithBasicMarkdown_ConvertsToSpectreMarkup()
128128 Out = new AnsiConsoleOutput ( new StringWriter ( output ) )
129129 } ) ;
130130
131- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
131+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
132132 var interactionService = new ConsoleInteractionService ( console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
133133 var markdown = "# Header\n This is **bold** and *italic* text with `code`." ;
134134
@@ -155,7 +155,7 @@ public void DisplayMarkdown_WithPlainText_DoesNotThrow()
155155 Out = new AnsiConsoleOutput ( new StringWriter ( output ) )
156156 } ) ;
157157
158- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
158+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
159159 var interactionService = new ConsoleInteractionService ( console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
160160 var plainText = "This is just plain text without any markdown." ;
161161
@@ -180,7 +180,7 @@ public async Task ShowStatusAsync_InDebugMode_DisplaysSubtleMessageInsteadOfSpin
180180 Out = new AnsiConsoleOutput ( new StringWriter ( output ) )
181181 } ) ;
182182
183- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) , debugMode : true ) ;
183+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) , debugMode : true ) ;
184184 var interactionService = new ConsoleInteractionService ( console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
185185 var statusText = "Processing request..." ;
186186 var result = "test result" ;
@@ -207,7 +207,7 @@ public void ShowStatus_InDebugMode_DisplaysSubtleMessageInsteadOfSpinner()
207207 Out = new AnsiConsoleOutput ( new StringWriter ( output ) )
208208 } ) ;
209209
210- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) , debugMode : true ) ;
210+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) , debugMode : true ) ;
211211 var interactionService = new ConsoleInteractionService ( console , executionContext , TestHelpers . CreateInteractiveHostEnvironment ( ) ) ;
212212 var statusText = "Processing synchronous request..." ;
213213 var actionCalled = false ;
@@ -226,7 +226,7 @@ public void ShowStatus_InDebugMode_DisplaysSubtleMessageInsteadOfSpinner()
226226 public async Task PromptForStringAsync_WhenInteractiveInputNotSupported_ThrowsInvalidOperationException ( )
227227 {
228228 // Arrange
229- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
229+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
230230 var hostEnvironment = TestHelpers . CreateNonInteractiveHostEnvironment ( ) ;
231231 var interactionService = new ConsoleInteractionService ( AnsiConsole . Console , executionContext , hostEnvironment ) ;
232232
@@ -240,7 +240,7 @@ public async Task PromptForStringAsync_WhenInteractiveInputNotSupported_ThrowsIn
240240 public async Task PromptForSelectionAsync_WhenInteractiveInputNotSupported_ThrowsInvalidOperationException ( )
241241 {
242242 // Arrange
243- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
243+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
244244 var hostEnvironment = TestHelpers . CreateNonInteractiveHostEnvironment ( ) ;
245245 var interactionService = new ConsoleInteractionService ( AnsiConsole . Console , executionContext , hostEnvironment ) ;
246246 var choices = new [ ] { "option1" , "option2" } ;
@@ -255,7 +255,7 @@ public async Task PromptForSelectionAsync_WhenInteractiveInputNotSupported_Throw
255255 public async Task PromptForSelectionsAsync_WhenInteractiveInputNotSupported_ThrowsInvalidOperationException ( )
256256 {
257257 // Arrange
258- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
258+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
259259 var hostEnvironment = TestHelpers . CreateNonInteractiveHostEnvironment ( ) ;
260260 var interactionService = new ConsoleInteractionService ( AnsiConsole . Console , executionContext , hostEnvironment ) ;
261261 var choices = new [ ] { "option1" , "option2" } ;
@@ -270,7 +270,7 @@ public async Task PromptForSelectionsAsync_WhenInteractiveInputNotSupported_Thro
270270 public async Task ConfirmAsync_WhenInteractiveInputNotSupported_ThrowsInvalidOperationException ( )
271271 {
272272 // Arrange
273- var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ) ;
273+ var executionContext = new CliExecutionContext ( new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( "." ) , new DirectoryInfo ( Path . Combine ( Path . GetTempPath ( ) , "aspire-test-runtimes" ) ) ) ;
274274 var hostEnvironment = TestHelpers . CreateNonInteractiveHostEnvironment ( ) ;
275275 var interactionService = new ConsoleInteractionService ( AnsiConsole . Console , executionContext , hostEnvironment ) ;
276276
0 commit comments