@@ -41,7 +41,7 @@ public void Dispose()
4141
4242 private ScriptFile GetScriptFile ( ScriptRegion scriptRegion ) => workspace . GetFile ( TestUtilities . GetSharedPath ( scriptRegion . File ) ) ;
4343
44- private Task < IEnumerable < CompletionItem > > GetCompletionResultsAsync ( ScriptRegion scriptRegion )
44+ private Task < CompletionResults > GetCompletionResultsAsync ( ScriptRegion scriptRegion )
4545 {
4646 return completionHandler . GetCompletionsInFileAsync (
4747 GetScriptFile ( scriptRegion ) ,
@@ -53,15 +53,15 @@ private Task<IEnumerable<CompletionItem>> GetCompletionResultsAsync(ScriptRegion
5353 [ Fact ]
5454 public async Task CompletesCommandInFile ( )
5555 {
56- IEnumerable < CompletionItem > results = await GetCompletionResultsAsync ( CompleteCommandInFile . SourceDetails ) . ConfigureAwait ( true ) ;
56+ ( _ , IEnumerable < CompletionItem > results ) = await GetCompletionResultsAsync ( CompleteCommandInFile . SourceDetails ) . ConfigureAwait ( true ) ;
5757 CompletionItem actual = Assert . Single ( results ) ;
5858 Assert . Equal ( CompleteCommandInFile . ExpectedCompletion , actual ) ;
5959 }
6060
6161 [ Fact ]
6262 public async Task CompletesCommandFromModule ( )
6363 {
64- IEnumerable < CompletionItem > results = await GetCompletionResultsAsync ( CompleteCommandFromModule . SourceDetails ) . ConfigureAwait ( true ) ;
64+ ( _ , IEnumerable < CompletionItem > results ) = await GetCompletionResultsAsync ( CompleteCommandFromModule . SourceDetails ) . ConfigureAwait ( true ) ;
6565 CompletionItem actual = Assert . Single ( results ) ;
6666 // NOTE: The tooltip varies across PowerShell and OS versions, so we ignore it.
6767 Assert . Equal ( CompleteCommandFromModule . ExpectedCompletion , actual with { Detail = "" } ) ;
@@ -71,7 +71,7 @@ public async Task CompletesCommandFromModule()
7171 [ Fact ]
7272 public async Task CompletesTypeName ( )
7373 {
74- IEnumerable < CompletionItem > results = await GetCompletionResultsAsync ( CompleteTypeName . SourceDetails ) . ConfigureAwait ( true ) ;
74+ ( _ , IEnumerable < CompletionItem > results ) = await GetCompletionResultsAsync ( CompleteTypeName . SourceDetails ) . ConfigureAwait ( true ) ;
7575 CompletionItem actual = Assert . Single ( results ) ;
7676 if ( VersionUtils . IsNetCore )
7777 {
@@ -92,23 +92,23 @@ public async Task CompletesTypeName()
9292 [ Fact ]
9393 public async Task CompletesNamespace ( )
9494 {
95- IEnumerable < CompletionItem > results = await GetCompletionResultsAsync ( CompleteNamespace . SourceDetails ) . ConfigureAwait ( true ) ;
95+ ( _ , IEnumerable < CompletionItem > results ) = await GetCompletionResultsAsync ( CompleteNamespace . SourceDetails ) . ConfigureAwait ( true ) ;
9696 CompletionItem actual = Assert . Single ( results ) ;
9797 Assert . Equal ( CompleteNamespace . ExpectedCompletion , actual ) ;
9898 }
9999
100100 [ Fact ]
101101 public async Task CompletesVariableInFile ( )
102102 {
103- IEnumerable < CompletionItem > results = await GetCompletionResultsAsync ( CompleteVariableInFile . SourceDetails ) . ConfigureAwait ( true ) ;
103+ ( _ , IEnumerable < CompletionItem > results ) = await GetCompletionResultsAsync ( CompleteVariableInFile . SourceDetails ) . ConfigureAwait ( true ) ;
104104 CompletionItem actual = Assert . Single ( results ) ;
105105 Assert . Equal ( CompleteVariableInFile . ExpectedCompletion , actual ) ;
106106 }
107107
108108 [ Fact ]
109109 public async Task CompletesAttributeValue ( )
110110 {
111- IEnumerable < CompletionItem > results = await GetCompletionResultsAsync ( CompleteAttributeValue . SourceDetails ) . ConfigureAwait ( true ) ;
111+ ( _ , IEnumerable < CompletionItem > results ) = await GetCompletionResultsAsync ( CompleteAttributeValue . SourceDetails ) . ConfigureAwait ( true ) ;
112112 Assert . Collection ( results . OrderBy ( c => c . SortText ) ,
113113 actual => Assert . Equal ( actual , CompleteAttributeValue . ExpectedCompletion1 ) ,
114114 actual => Assert . Equal ( actual , CompleteAttributeValue . ExpectedCompletion2 ) ,
@@ -118,7 +118,7 @@ public async Task CompletesAttributeValue()
118118 [ Fact ]
119119 public async Task CompletesFilePath ( )
120120 {
121- IEnumerable < CompletionItem > results = await GetCompletionResultsAsync ( CompleteFilePath . SourceDetails ) . ConfigureAwait ( true ) ;
121+ ( _ , IEnumerable < CompletionItem > results ) = await GetCompletionResultsAsync ( CompleteFilePath . SourceDetails ) . ConfigureAwait ( true ) ;
122122 Assert . NotEmpty ( results ) ;
123123 CompletionItem actual = results . First ( ) ;
124124 // Paths are system dependent so we ignore the text and just check the type and range.
0 commit comments