19
19
using Xunit ;
20
20
namespace Microsoft . PowerShell . EditorServices . Test . Debugging
21
21
{
22
+ [ Trait ( "Category" , "DebugService" ) ]
22
23
public class DebugServiceTests : IDisposable
23
24
{
24
25
private readonly PsesInternalHost psesHost ;
@@ -141,7 +142,6 @@ private Task<IReadOnlyList<LineBreakpoint>> GetConfirmedBreakpoints(ScriptFile s
141
142
CancellationToken . None ) ;
142
143
}
143
144
144
- [ Trait ( "Category" , "DebugService" ) ]
145
145
[ Fact ]
146
146
// This regression test asserts that `ExecuteScriptWithArgsAsync` works for both script
147
147
// files and, in this case, in-line scripts (commands). The bug was that the cwd was
@@ -170,7 +170,6 @@ await debugService.SetCommandBreakpointsAsync(
170
170
Assert . Equal ( "[ArrayList: 0]" , var . ValueString ) ;
171
171
}
172
172
173
- [ Trait ( "Category" , "DebugService" ) ]
174
173
[ Fact ]
175
174
public async Task DebuggerAcceptsScriptArgs ( )
176
175
{
@@ -232,7 +231,6 @@ public async Task DebuggerAcceptsScriptArgs()
232
231
Assert . Equal ( "\" Extra1\" " , childVars [ 0 ] . ValueString ) ;
233
232
}
234
233
235
- [ Trait ( "Category" , "DebugService" ) ]
236
234
[ Fact ]
237
235
public async Task DebuggerSetsAndClearsFunctionBreakpoints ( )
238
236
{
@@ -258,7 +256,6 @@ public async Task DebuggerSetsAndClearsFunctionBreakpoints()
258
256
Assert . Empty ( breakpoints ) ;
259
257
}
260
258
261
- [ Trait ( "Category" , "DebugService" ) ]
262
259
[ Fact ]
263
260
public async Task DebuggerStopsOnFunctionBreakpoints ( )
264
261
{
@@ -289,7 +286,6 @@ public async Task DebuggerStopsOnFunctionBreakpoints()
289
286
Assert . Equal ( "2" , i . ValueString ) ;
290
287
}
291
288
292
- [ Trait ( "Category" , "DebugService" ) ]
293
289
[ Fact ]
294
290
public async Task DebuggerSetsAndClearsLineBreakpoints ( )
295
291
{
@@ -323,7 +319,6 @@ await debugService.SetLineBreakpointsAsync(
323
319
Assert . Empty ( remainingBreakpoints ) ;
324
320
}
325
321
326
- [ Trait ( "Category" , "DebugService" ) ]
327
322
[ Fact ]
328
323
public async Task DebuggerStopsOnLineBreakpoints ( )
329
324
{
@@ -340,7 +335,6 @@ await debugService.SetLineBreakpointsAsync(
340
335
AssertDebuggerStopped ( debugScriptFile . FilePath , 7 ) ;
341
336
}
342
337
343
- [ Trait ( "Category" , "DebugService" ) ]
344
338
[ Fact ]
345
339
public async Task DebuggerStopsOnConditionalBreakpoints ( )
346
340
{
@@ -378,7 +372,6 @@ await debugService.SetLineBreakpointsAsync(
378
372
Assert . Equal ( $ "{ breakpointValue2 } ", i . ValueString ) ;
379
373
}
380
374
381
- [ Trait ( "Category" , "DebugService" ) ]
382
375
[ Fact ]
383
376
public async Task DebuggerStopsOnHitConditionBreakpoint ( )
384
377
{
@@ -402,7 +395,6 @@ await debugService.SetLineBreakpointsAsync(
402
395
Assert . Equal ( $ "{ hitCount } ", i . ValueString ) ;
403
396
}
404
397
405
- [ Trait ( "Category" , "DebugService" ) ]
406
398
[ Fact ]
407
399
public async Task DebuggerStopsOnConditionalAndHitConditionBreakpoint ( )
408
400
{
@@ -425,7 +417,6 @@ await debugService.SetLineBreakpointsAsync(
425
417
Assert . Equal ( "10" , i . ValueString ) ;
426
418
}
427
419
428
- [ Trait ( "Category" , "DebugService" ) ]
429
420
[ Fact ]
430
421
public async Task DebuggerProvidesMessageForInvalidConditionalBreakpoint ( )
431
422
{
@@ -454,7 +445,6 @@ await debugService.SetLineBreakpointsAsync(
454
445
Assert . Contains ( "Unexpected token '-ez'" , breakpoints [ 0 ] . Message ) ;
455
446
}
456
447
457
- [ Trait ( "Category" , "DebugService" ) ]
458
448
[ Fact ]
459
449
public async Task DebuggerFindsParseableButInvalidSimpleBreakpointConditions ( )
460
450
{
@@ -477,7 +467,6 @@ await debugService.SetLineBreakpointsAsync(
477
467
Assert . Contains ( "Use '-gt' instead of '>'" , breakpoints [ 1 ] . Message ) ;
478
468
}
479
469
480
- [ Trait ( "Category" , "DebugService" ) ]
481
470
[ Fact ]
482
471
public async Task DebuggerBreaksWhenRequested ( )
483
472
{
@@ -489,7 +478,6 @@ public async Task DebuggerBreaksWhenRequested()
489
478
AssertDebuggerPaused ( ) ;
490
479
}
491
480
492
- [ Trait ( "Category" , "DebugService" ) ]
493
481
[ Fact ]
494
482
public async Task DebuggerRunsCommandsWhileStopped ( )
495
483
{
@@ -504,7 +492,6 @@ public async Task DebuggerRunsCommandsWhileStopped()
504
492
Assert . Equal ( 17 , ( await executeTask . ConfigureAwait ( true ) ) [ 0 ] ) ;
505
493
}
506
494
507
- [ Trait ( "Category" , "DebugService" ) ]
508
495
[ Fact ]
509
496
public async Task DebuggerVariableStringDisplaysCorrectly ( )
510
497
{
@@ -523,7 +510,6 @@ await debugService.SetLineBreakpointsAsync(
523
510
Assert . False ( var . IsExpandable ) ;
524
511
}
525
512
526
- [ Trait ( "Category" , "DebugService" ) ]
527
513
[ Fact ]
528
514
public async Task DebuggerGetsVariables ( )
529
515
{
@@ -573,7 +559,6 @@ await debugService.SetLineBreakpointsAsync(
573
559
Assert . Equal ( "$false" , falseVar . ValueString ) ;
574
560
}
575
561
576
- [ Trait ( "Category" , "DebugService" ) ]
577
562
[ Fact ]
578
563
public async Task DebuggerSetsVariablesNoConversion ( )
579
564
{
@@ -628,7 +613,6 @@ await debugService.SetLineBreakpointsAsync(
628
613
Assert . Equal ( newGlobalIntValue , intGlobalVar . ValueString ) ;
629
614
}
630
615
631
- [ Trait ( "Category" , "DebugService" ) ]
632
616
[ Fact ( Skip = "Variable conversion is broken" ) ]
633
617
public async Task DebuggerSetsVariablesWithConversion ( )
634
618
{
@@ -687,7 +671,6 @@ await debugService.SetLineBreakpointsAsync(
687
671
Assert . Equal ( newGlobalValue , globalVar . ValueString ) ;
688
672
}
689
673
690
- [ Trait ( "Category" , "DebugService" ) ]
691
674
[ Fact ]
692
675
public async Task DebuggerVariableEnumDisplaysCorrectly ( )
693
676
{
@@ -708,7 +691,6 @@ await debugService.SetLineBreakpointsAsync(
708
691
Assert . False ( var . IsExpandable ) ;
709
692
}
710
693
711
- [ Trait ( "Category" , "DebugService" ) ]
712
694
[ Fact ]
713
695
public async Task DebuggerVariableHashtableDisplaysCorrectly ( )
714
696
{
@@ -745,7 +727,6 @@ await debugService.SetLineBreakpointsAsync(
745
727
}
746
728
}
747
729
748
- [ Trait ( "Category" , "DebugService" ) ]
749
730
[ Fact ]
750
731
public async Task DebuggerVariableNullStringDisplaysCorrectly ( )
751
732
{
@@ -766,7 +747,6 @@ await debugService.SetLineBreakpointsAsync(
766
747
Assert . True ( nullStringVar . IsExpandable ) ;
767
748
}
768
749
769
- [ Trait ( "Category" , "DebugService" ) ]
770
750
[ Fact ]
771
751
public async Task DebuggerVariablePSObjectDisplaysCorrectly ( )
772
752
{
@@ -794,7 +774,6 @@ await debugService.SetLineBreakpointsAsync(
794
774
Assert . Equal ( "\" John\" " , childVars [ "Name" ] ) ;
795
775
}
796
776
797
- [ Trait ( "Category" , "DebugService" ) ]
798
777
[ Fact ]
799
778
public async Task DebuggerVariablePSCustomObjectDisplaysCorrectly ( )
800
779
{
@@ -824,7 +803,6 @@ await debugService.SetLineBreakpointsAsync(
824
803
825
804
// Verifies fix for issue #86, $proc = Get-Process foo displays just the ETS property set
826
805
// and not all process properties.
827
- [ Trait ( "Category" , "DebugService" ) ]
828
806
[ Fact ( Skip = "Length of child vars is wrong now" ) ]
829
807
public async Task DebuggerVariableProcessObjDisplaysCorrectly ( )
830
808
{
0 commit comments