@@ -203,7 +203,7 @@ await debugService.SetCommandBreakpointsAsync(
203203 [ MemberData ( nameof ( DebuggerAcceptsScriptArgsTestData ) ) ]
204204 public async Task DebuggerAcceptsScriptArgs ( string [ ] args )
205205 {
206- IEnumerable < BreakpointDetails > breakpoints = await debugService . SetLineBreakpointsAsync (
206+ IReadOnlyList < BreakpointDetails > breakpoints = await debugService . SetLineBreakpointsAsync (
207207 oddPathScriptFile ,
208208 new [ ] { BreakpointDetails . Create ( oddPathScriptFile . FilePath , 3 ) } ) . ConfigureAwait ( true ) ;
209209
@@ -257,15 +257,15 @@ public async Task DebuggerAcceptsScriptArgs(string[] args)
257257 [ Fact ]
258258 public async Task DebuggerSetsAndClearsFunctionBreakpoints ( )
259259 {
260- CommandBreakpointDetails [ ] breakpoints = await debugService . SetCommandBreakpointsAsync (
260+ IReadOnlyList < CommandBreakpointDetails > breakpoints = await debugService . SetCommandBreakpointsAsync (
261261 new [ ] {
262262 CommandBreakpointDetails . Create ( "Write-Host" ) ,
263263 CommandBreakpointDetails . Create ( "Get-Date" )
264264 } ) . ConfigureAwait ( true ) ;
265265
266- Assert . Equal ( 2 , breakpoints . Length ) ;
267- Assert . Equal ( "Write-Host" , breakpoints . ElementAt ( 0 ) . Name ) ;
268- Assert . Equal ( "Get-Date" , breakpoints . ElementAt ( 1 ) . Name ) ;
266+ Assert . Equal ( 2 , breakpoints . Count ) ;
267+ Assert . Equal ( "Write-Host" , breakpoints [ 0 ] . Name ) ;
268+ Assert . Equal ( "Get-Date" , breakpoints [ 1 ] . Name ) ;
269269
270270 breakpoints = await debugService . SetCommandBreakpointsAsync (
271271 new [ ] { CommandBreakpointDetails . Create ( "Get-Host" ) } ) . ConfigureAwait ( true ) ;
@@ -281,7 +281,7 @@ public async Task DebuggerSetsAndClearsFunctionBreakpoints()
281281 [ Fact ]
282282 public async Task DebuggerStopsOnFunctionBreakpoints ( )
283283 {
284- CommandBreakpointDetails [ ] breakpoints = await debugService . SetCommandBreakpointsAsync (
284+ IReadOnlyList < CommandBreakpointDetails > breakpoints = await debugService . SetCommandBreakpointsAsync (
285285 new [ ] { CommandBreakpointDetails . Create ( "Write-Host" ) } ) . ConfigureAwait ( true ) ;
286286
287287 Task _ = ExecuteDebugFileAsync ( ) ;
@@ -311,7 +311,7 @@ public async Task DebuggerStopsOnFunctionBreakpoints()
311311 [ Fact ]
312312 public async Task DebuggerSetsAndClearsLineBreakpoints ( )
313313 {
314- IEnumerable < BreakpointDetails > breakpoints =
314+ IReadOnlyList < BreakpointDetails > breakpoints =
315315 await debugService . SetLineBreakpointsAsync (
316316 debugScriptFile ,
317317 new [ ] {
@@ -322,16 +322,16 @@ await debugService.SetLineBreakpointsAsync(
322322 IReadOnlyList < LineBreakpoint > confirmedBreakpoints = await GetConfirmedBreakpoints ( debugScriptFile ) . ConfigureAwait ( true ) ;
323323
324324 Assert . Equal ( 2 , confirmedBreakpoints . Count ) ;
325- Assert . Equal ( 5 , breakpoints . ElementAt ( 0 ) . LineNumber ) ;
326- Assert . Equal ( 10 , breakpoints . ElementAt ( 1 ) . LineNumber ) ;
325+ Assert . Equal ( 5 , breakpoints [ 0 ] . LineNumber ) ;
326+ Assert . Equal ( 10 , breakpoints [ 1 ] . LineNumber ) ;
327327
328328 breakpoints = await debugService . SetLineBreakpointsAsync (
329329 debugScriptFile ,
330330 new [ ] { BreakpointDetails . Create ( debugScriptFile . FilePath , 2 ) } ) . ConfigureAwait ( true ) ;
331331 confirmedBreakpoints = await GetConfirmedBreakpoints ( debugScriptFile ) . ConfigureAwait ( true ) ;
332332
333333 Assert . Single ( confirmedBreakpoints ) ;
334- Assert . Equal ( 2 , breakpoints . ElementAt ( 0 ) . LineNumber ) ;
334+ Assert . Equal ( 2 , breakpoints [ 0 ] . LineNumber ) ;
335335
336336 await debugService . SetLineBreakpointsAsync (
337337 debugScriptFile ,
@@ -442,7 +442,7 @@ await debugService.SetLineBreakpointsAsync(
442442 [ Fact ]
443443 public async Task DebuggerProvidesMessageForInvalidConditionalBreakpoint ( )
444444 {
445- IEnumerable < BreakpointDetails > breakpoints =
445+ IReadOnlyList < BreakpointDetails > breakpoints =
446446 await debugService . SetLineBreakpointsAsync (
447447 debugScriptFile ,
448448 new [ ] {
@@ -457,36 +457,36 @@ await debugService.SetLineBreakpointsAsync(
457457 } ) . ConfigureAwait ( true ) ;
458458
459459 Assert . Single ( breakpoints ) ;
460- // Assert.Equal(5, breakpoints.ElementAt(0) .LineNumber);
461- // Assert.True(breakpoints.ElementAt(0) .Verified);
462- // Assert.Null(breakpoints.ElementAt(0) .Message);
463-
464- Assert . Equal ( 10 , breakpoints . ElementAt ( 0 ) . LineNumber ) ;
465- Assert . False ( breakpoints . ElementAt ( 0 ) . Verified ) ;
466- Assert . NotNull ( breakpoints . ElementAt ( 0 ) . Message ) ;
467- Assert . Contains ( "Unexpected token '-ez'" , breakpoints . ElementAt ( 0 ) . Message ) ;
460+ // Assert.Equal(5, breakpoints[0] .LineNumber);
461+ // Assert.True(breakpoints[0] .Verified);
462+ // Assert.Null(breakpoints[0] .Message);
463+
464+ Assert . Equal ( 10 , breakpoints [ 0 ] . LineNumber ) ;
465+ Assert . False ( breakpoints [ 0 ] . Verified ) ;
466+ Assert . NotNull ( breakpoints [ 0 ] . Message ) ;
467+ Assert . Contains ( "Unexpected token '-ez'" , breakpoints [ 0 ] . Message ) ;
468468 }
469469
470470 [ Fact ]
471471 public async Task DebuggerFindsParsableButInvalidSimpleBreakpointConditions ( )
472472 {
473- IEnumerable < BreakpointDetails > breakpoints =
473+ IReadOnlyList < BreakpointDetails > breakpoints =
474474 await debugService . SetLineBreakpointsAsync (
475475 debugScriptFile ,
476476 new [ ] {
477477 BreakpointDetails . Create ( debugScriptFile . FilePath , 5 , column : null , condition : "$i == 100" ) ,
478478 BreakpointDetails . Create ( debugScriptFile . FilePath , 7 , column : null , condition : "$i > 100" )
479479 } ) . ConfigureAwait ( true ) ;
480480
481- Assert . Equal ( 2 , breakpoints . Count ( ) ) ;
482- Assert . Equal ( 5 , breakpoints . ElementAt ( 0 ) . LineNumber ) ;
483- Assert . False ( breakpoints . ElementAt ( 0 ) . Verified ) ;
484- Assert . Contains ( "Use '-eq' instead of '=='" , breakpoints . ElementAt ( 0 ) . Message ) ;
481+ Assert . Equal ( 2 , breakpoints . Count ) ;
482+ Assert . Equal ( 5 , breakpoints [ 0 ] . LineNumber ) ;
483+ Assert . False ( breakpoints [ 0 ] . Verified ) ;
484+ Assert . Contains ( "Use '-eq' instead of '=='" , breakpoints [ 0 ] . Message ) ;
485485
486- Assert . Equal ( 7 , breakpoints . ElementAt ( 1 ) . LineNumber ) ;
487- Assert . False ( breakpoints . ElementAt ( 1 ) . Verified ) ;
488- Assert . NotNull ( breakpoints . ElementAt ( 1 ) . Message ) ;
489- Assert . Contains ( "Use '-gt' instead of '>'" , breakpoints . ElementAt ( 1 ) . Message ) ;
486+ Assert . Equal ( 7 , breakpoints [ 1 ] . LineNumber ) ;
487+ Assert . False ( breakpoints [ 1 ] . Verified ) ;
488+ Assert . NotNull ( breakpoints [ 1 ] . Message ) ;
489+ Assert . Contains ( "Use '-gt' instead of '>'" , breakpoints [ 1 ] . Message ) ;
490490 }
491491
492492 [ Fact ]
0 commit comments