@@ -65,7 +65,7 @@ public async Task EmptyFileShouldProduceDeclarationCompletions()
65
65
66
66
var expected = JToken . Parse ( expectedStr ) ;
67
67
68
- actual . Should ( ) . EqualWithJsonDiffOutput ( TestContext , expected , GetGlobalCompletionSetPath ( expectedSetName ) , actualLocation ) ;
68
+ actual . Should ( ) . EqualWithJsonDiffOutput ( this . TestContext , expected , GetGlobalCompletionSetPath ( expectedSetName ) , actualLocation ) ;
69
69
}
70
70
71
71
[ DataTestMethod ]
@@ -75,7 +75,7 @@ public async Task ValidateSnippetCompletionAfterPlaceholderReplacements(Completi
75
75
{
76
76
string pathPrefix = $ "Completions/SnippetTemplates/{ completionData . Prefix } ";
77
77
78
- var outputDirectory = FileHelper . SaveEmbeddedResourcesWithPathPrefix ( TestContext , typeof ( CompletionTests ) . Assembly , pathPrefix ) ;
78
+ var outputDirectory = FileHelper . SaveEmbeddedResourcesWithPathPrefix ( this . TestContext , typeof ( CompletionTests ) . Assembly , pathPrefix ) ;
79
79
80
80
var bicepFileName = Path . Combine ( outputDirectory , "main.bicep" ) ;
81
81
var bicepSourceFileName = Path . Combine ( "src" , "Bicep.LangServer.IntegrationTests" , pathPrefix , Path . GetRelativePath ( outputDirectory , bicepFileName ) ) ;
@@ -195,7 +195,7 @@ public async Task String_segments_do_not_return_completions()
195
195
'''|
196
196
" ;
197
197
198
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
198
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
199
199
}
200
200
201
201
[ TestMethod ]
@@ -205,7 +205,7 @@ public async Task Completions_are_offered_in_string_expressions()
205
205
var interpolatedString = 'abc${|true}def${|}ghi${res|}xyz'
206
206
" ;
207
207
208
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsNonEmpty ) ;
208
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsNonEmpty ) ;
209
209
}
210
210
211
211
[ TestMethod ]
@@ -216,7 +216,7 @@ public async Task Completions_are_offered_immediately_before_and_after_comments(
216
216
var test2 = |/* block comment */|
217
217
" ;
218
218
219
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsNonEmpty ) ;
219
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsNonEmpty ) ;
220
220
}
221
221
222
222
[ TestMethod ]
@@ -232,7 +232,7 @@ public async Task Completions_are_not_offered_immediately_after_open_paren()
232
232
output baz object = {|
233
233
" ;
234
234
235
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
235
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
236
236
}
237
237
238
238
[ TestMethod ]
@@ -243,7 +243,7 @@ public async Task Completions_are_not_offered_inside_comments()
243
243
var test2 = /|* block c|omment *|/
244
244
" ;
245
245
246
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
246
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
247
247
}
248
248
249
249
[ TestMethod ]
@@ -415,7 +415,7 @@ public async Task Property_completions_include_descriptions()
415
415
output string test2 = testRes.properties.|
416
416
" ;
417
417
418
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , completions =>
418
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , completions =>
419
419
completions . Should ( ) . SatisfyRespectively (
420
420
x => x ! . OrderBy ( d => d . SortText ) . Should ( ) . SatisfyRespectively (
421
421
d => d . Documentation ! . MarkupContent ! . Value . Should ( ) . Contain ( "This is a property which supports reading AND writing!" ) ,
@@ -467,7 +467,7 @@ static void AssertExistingKeywordCompletion(CompletionItem item)
467
467
}
468
468
469
469
470
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , completions =>
470
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , completions =>
471
471
completions . Should ( ) . SatisfyRespectively (
472
472
x => x ! . OrderBy ( d => d . SortText ) . Should ( ) . SatisfyRespectively ( d => AssertExistingKeywordCompletion ( d ) ) ,
473
473
x => x ! . OrderBy ( d => d . SortText ) . Should ( ) . SatisfyRespectively ( d => AssertExistingKeywordCompletion ( d ) ) ,
@@ -495,7 +495,7 @@ static void AssertPropertyNameCompletionsWithColons(CompletionList list)
495
495
. OnlyContain ( x => string . Equals ( x . TextEdit ! . TextEdit ! . NewText , x . Label + ':' ) ) ;
496
496
}
497
497
498
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , completions =>
498
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , completions =>
499
499
completions . Should ( ) . SatisfyRespectively (
500
500
l => AssertPropertyNameCompletionsWithColons ( l ! ) ,
501
501
l => AssertPropertyNameCompletionsWithColons ( l ! ) ) ) ;
@@ -521,7 +521,7 @@ static void AssertPropertyNameCompletionsWithoutColons(CompletionList list)
521
521
}
522
522
" ;
523
523
524
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , completions =>
524
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , completions =>
525
525
completions . Should ( ) . SatisfyRespectively (
526
526
l => AssertPropertyNameCompletionsWithoutColons ( l ! ) ,
527
527
l => AssertPropertyNameCompletionsWithoutColons ( l ! ) ) ) ;
@@ -538,7 +538,7 @@ public async Task RequestCompletionsInResourceBodies_AtPositionsWhereNodeShouldN
538
538
}
539
539
|}
540
540
" ;
541
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
541
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
542
542
}
543
543
544
544
[ TestMethod ]
@@ -574,7 +574,7 @@ public async Task RequestCompletionsInProgram_AtPositionsWhereNodeShouldNotBeIns
574
574
name: 'myRes'
575
575
}
576
576
" ;
577
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
577
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
578
578
}
579
579
580
580
[ TestMethod ]
@@ -592,7 +592,7 @@ public async Task RequestCompletionsInObjects_AtPositionsWhereNodeShouldNotBeIns
592
592
prop | : false
593
593
| }
594
594
" ;
595
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
595
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
596
596
}
597
597
598
598
[ TestMethod ]
@@ -611,7 +611,7 @@ public async Task RequestCompletionsInArrays_AtPositionsWhereNodeShouldBeInserte
611
611
| true
612
612
| ]
613
613
" ;
614
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
614
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
615
615
}
616
616
617
617
[ TestMethod ]
@@ -622,7 +622,7 @@ public async Task RequestCompletionsInExpressions_AtPositionsWhereNodeShouldBeIn
622
622
var binary = -1 | |+| | 2
623
623
var ternary = true | |?| | 'yes' | |:| | 'no'
624
624
" ;
625
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
625
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
626
626
}
627
627
628
628
[ TestMethod ]
@@ -633,7 +633,7 @@ public async Task RequestCompletions_MatchingNodeIsBooleanOrIntegerOrNullLiteral
633
633
var integerExp = |12|345| + |543|21|
634
634
var nullLit = |n|ull|
635
635
" ;
636
- await RunCompletionScenarioTest ( TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
636
+ await RunCompletionScenarioTest ( this . TestContext , fileWithCursors , AssertAllCompletionsEmpty ) ;
637
637
}
638
638
639
639
private static async Task RunCompletionScenarioTest ( TestContext testContext , string fileWithCursors , Action < IEnumerable < CompletionList ? > > assertAction )
@@ -646,7 +646,7 @@ private static async Task RunCompletionScenarioTest(TestContext testContext, str
646
646
assertAction ( completions ) ;
647
647
}
648
648
649
- private static Task RunCompletionScenarioTest ( object testContext , object fileWithCursors )
649
+ private static Task RunCompletionScenarioTest ( object testContext , Action < IEnumerable < CompletionList ? > > assertAction222 )
650
650
{
651
651
/*
652
652
* The compiler on GitHub actions seems to believe that we are only passing 2 arguments to this method.
@@ -712,7 +712,7 @@ private void ValidateCompletions(DataSet dataSet, string setName, List<(Position
712
712
_ => GetGlobalCompletionSetPath ( setName )
713
713
} ;
714
714
715
- actual . Should ( ) . EqualWithJsonDiffOutput ( TestContext , expected , expectedLocation , actualLocation , "because " ) ;
715
+ actual . Should ( ) . EqualWithJsonDiffOutput ( this . TestContext , expected , expectedLocation , actualLocation , "because " ) ;
716
716
}
717
717
718
718
private static string GetGlobalCompletionSetPath ( string setName ) => Path . Combine ( "src" , "Bicep.Core.Samples" , "Files" , DataSet . TestCompletionsDirectory , GetFullSetName ( setName ) ) ;
0 commit comments