@@ -82,7 +82,7 @@ await this.WaitForEvent(
82
82
PublishDiagnosticsNotification . Type ) ;
83
83
84
84
// Was there a syntax error?
85
- Assert . NotEqual ( 0 , diagnostics . Diagnostics . Length ) ;
85
+ Assert . NotEmpty ( diagnostics . Diagnostics ) ;
86
86
Assert . False (
87
87
string . IsNullOrEmpty ( diagnostics . Diagnostics [ 0 ] . Message ) ) ;
88
88
}
@@ -99,7 +99,7 @@ await this.WaitForEvent(
99
99
PublishDiagnosticsNotification . Type ) ;
100
100
101
101
// Was there a semantic error?
102
- Assert . NotEqual ( 0 , diagnostics . Diagnostics . Length ) ;
102
+ Assert . NotEmpty ( diagnostics . Diagnostics ) ;
103
103
Assert . Contains ( "unapproved" , diagnostics . Diagnostics [ 0 ] . Message ) ;
104
104
}
105
105
@@ -115,7 +115,7 @@ await this.WaitForEvent(
115
115
PublishDiagnosticsNotification . Type ) ;
116
116
117
117
// Was there a syntax error?
118
- Assert . Equal ( 0 , diagnostics . Diagnostics . Length ) ;
118
+ Assert . Empty ( diagnostics . Diagnostics ) ;
119
119
}
120
120
121
121
[ Fact ]
@@ -140,7 +140,7 @@ await this.SendRequest(
140
140
} ) ;
141
141
142
142
Assert . NotNull ( completions ) ;
143
- Assert . NotEqual ( completions . Length , 0 ) ;
143
+ Assert . NotEmpty ( completions ) ;
144
144
145
145
// TODO: Add more asserts
146
146
}
@@ -279,7 +279,7 @@ await this.SendRequest(
279
279
} ) ;
280
280
281
281
Assert . NotNull ( locations ) ;
282
- Assert . Equal ( locations . Length , 3 ) ;
282
+ Assert . Equal ( 3 , locations . Length ) ;
283
283
284
284
Assert . Equal ( 5 , locations [ 0 ] . Range . Start . Line ) ;
285
285
Assert . Equal ( 0 , locations [ 0 ] . Range . Start . Character ) ;
@@ -311,7 +311,7 @@ await this.SendRequest(
311
311
} ) ;
312
312
313
313
Assert . NotNull ( locations ) ;
314
- Assert . Equal ( 0 , locations . Length ) ;
314
+ Assert . Empty ( locations ) ;
315
315
}
316
316
317
317
[ Fact ]
@@ -400,7 +400,7 @@ await this.SendRequest(
400
400
} ) ;
401
401
402
402
Assert . NotNull ( locations ) ;
403
- Assert . Equal ( 1 , locations . Length ) ;
403
+ Assert . Single ( locations ) ;
404
404
Assert . Equal ( 0 , locations [ 0 ] . Range . Start . Line ) ;
405
405
Assert . Equal ( 9 , locations [ 0 ] . Range . Start . Character ) ;
406
406
}
@@ -427,7 +427,7 @@ await this.SendRequest(
427
427
} ) ;
428
428
429
429
Assert . NotNull ( locations ) ;
430
- Assert . Equal ( 0 , locations . Length ) ;
430
+ Assert . Empty ( locations ) ;
431
431
}
432
432
433
433
[ Fact ]
@@ -452,7 +452,7 @@ await this.SendRequest(
452
452
} ) ;
453
453
454
454
Assert . NotNull ( locations ) ;
455
- Assert . Equal ( 1 , locations . Length ) ;
455
+ Assert . Single ( locations ) ;
456
456
Assert . Equal ( 5 , locations [ 0 ] . Range . Start . Line ) ;
457
457
Assert . Equal ( 0 , locations [ 0 ] . Range . Start . Character ) ;
458
458
Assert . Equal ( 5 , locations [ 0 ] . Range . End . Line ) ;
@@ -481,7 +481,7 @@ await this.SendRequest(
481
481
} ) ;
482
482
483
483
Assert . NotNull ( locations ) ;
484
- Assert . Equal ( 1 , locations . Length ) ;
484
+ Assert . Single ( locations ) ;
485
485
Assert . EndsWith ( "VariableDefinition.ps1" , locations [ 0 ] . Uri ) ;
486
486
Assert . Equal ( 0 , locations [ 0 ] . Range . Start . Line ) ;
487
487
Assert . Equal ( 0 , locations [ 0 ] . Range . Start . Character ) ;
@@ -511,7 +511,7 @@ await this.SendRequest(
511
511
} ) ;
512
512
513
513
Assert . NotNull ( locations ) ;
514
- Assert . Equal ( 1 , locations . Length ) ;
514
+ Assert . Single ( locations ) ;
515
515
Assert . EndsWith ( "FindReferences.ps1" , locations [ 0 ] . Uri ) ;
516
516
Assert . Equal ( 17 , locations [ 0 ] . Range . Start . Line ) ;
517
517
Assert . Equal ( 0 , locations [ 0 ] . Range . Start . Character ) ;
@@ -567,7 +567,7 @@ await this.SendRequest(
567
567
} ) ;
568
568
569
569
Assert . NotNull ( signatureHelp ) ;
570
- Assert . Equal ( 1 , signatureHelp . Signatures . Length ) ;
570
+ Assert . Single ( signatureHelp . Signatures ) ;
571
571
Assert . Equal ( 2 , signatureHelp . Signatures [ 0 ] . Parameters . Length ) ;
572
572
Assert . Equal (
573
573
"Write-Output [-InputObject] <psobject[]> [-NoEnumerate] [<CommonParameters>]" ,
0 commit comments