Skip to content

Commit 57bdb36

Browse files
committed
Simplify application of Trait in DebugServiceTests
1 parent 4997f67 commit 57bdb36

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

test/PowerShellEditorServices.Test/Debugging/DebugServiceTests.cs

+1-23
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
using Xunit;
2020
namespace Microsoft.PowerShell.EditorServices.Test.Debugging
2121
{
22+
[Trait("Category", "DebugService")]
2223
public class DebugServiceTests : IDisposable
2324
{
2425
private readonly PsesInternalHost psesHost;
@@ -141,7 +142,6 @@ private Task<IReadOnlyList<LineBreakpoint>> GetConfirmedBreakpoints(ScriptFile s
141142
CancellationToken.None);
142143
}
143144

144-
[Trait("Category", "DebugService")]
145145
[Fact]
146146
// This regression test asserts that `ExecuteScriptWithArgsAsync` works for both script
147147
// files and, in this case, in-line scripts (commands). The bug was that the cwd was
@@ -170,7 +170,6 @@ await debugService.SetCommandBreakpointsAsync(
170170
Assert.Equal("[ArrayList: 0]", var.ValueString);
171171
}
172172

173-
[Trait("Category", "DebugService")]
174173
[Fact]
175174
public async Task DebuggerAcceptsScriptArgs()
176175
{
@@ -232,7 +231,6 @@ public async Task DebuggerAcceptsScriptArgs()
232231
Assert.Equal("\"Extra1\"", childVars[0].ValueString);
233232
}
234233

235-
[Trait("Category", "DebugService")]
236234
[Fact]
237235
public async Task DebuggerSetsAndClearsFunctionBreakpoints()
238236
{
@@ -258,7 +256,6 @@ public async Task DebuggerSetsAndClearsFunctionBreakpoints()
258256
Assert.Empty(breakpoints);
259257
}
260258

261-
[Trait("Category", "DebugService")]
262259
[Fact]
263260
public async Task DebuggerStopsOnFunctionBreakpoints()
264261
{
@@ -289,7 +286,6 @@ public async Task DebuggerStopsOnFunctionBreakpoints()
289286
Assert.Equal("2", i.ValueString);
290287
}
291288

292-
[Trait("Category", "DebugService")]
293289
[Fact]
294290
public async Task DebuggerSetsAndClearsLineBreakpoints()
295291
{
@@ -323,7 +319,6 @@ await debugService.SetLineBreakpointsAsync(
323319
Assert.Empty(remainingBreakpoints);
324320
}
325321

326-
[Trait("Category", "DebugService")]
327322
[Fact]
328323
public async Task DebuggerStopsOnLineBreakpoints()
329324
{
@@ -340,7 +335,6 @@ await debugService.SetLineBreakpointsAsync(
340335
AssertDebuggerStopped(debugScriptFile.FilePath, 7);
341336
}
342337

343-
[Trait("Category", "DebugService")]
344338
[Fact]
345339
public async Task DebuggerStopsOnConditionalBreakpoints()
346340
{
@@ -378,7 +372,6 @@ await debugService.SetLineBreakpointsAsync(
378372
Assert.Equal($"{breakpointValue2}", i.ValueString);
379373
}
380374

381-
[Trait("Category", "DebugService")]
382375
[Fact]
383376
public async Task DebuggerStopsOnHitConditionBreakpoint()
384377
{
@@ -402,7 +395,6 @@ await debugService.SetLineBreakpointsAsync(
402395
Assert.Equal($"{hitCount}", i.ValueString);
403396
}
404397

405-
[Trait("Category", "DebugService")]
406398
[Fact]
407399
public async Task DebuggerStopsOnConditionalAndHitConditionBreakpoint()
408400
{
@@ -425,7 +417,6 @@ await debugService.SetLineBreakpointsAsync(
425417
Assert.Equal("10", i.ValueString);
426418
}
427419

428-
[Trait("Category", "DebugService")]
429420
[Fact]
430421
public async Task DebuggerProvidesMessageForInvalidConditionalBreakpoint()
431422
{
@@ -454,7 +445,6 @@ await debugService.SetLineBreakpointsAsync(
454445
Assert.Contains("Unexpected token '-ez'", breakpoints[0].Message);
455446
}
456447

457-
[Trait("Category", "DebugService")]
458448
[Fact]
459449
public async Task DebuggerFindsParseableButInvalidSimpleBreakpointConditions()
460450
{
@@ -477,7 +467,6 @@ await debugService.SetLineBreakpointsAsync(
477467
Assert.Contains("Use '-gt' instead of '>'", breakpoints[1].Message);
478468
}
479469

480-
[Trait("Category", "DebugService")]
481470
[Fact]
482471
public async Task DebuggerBreaksWhenRequested()
483472
{
@@ -489,7 +478,6 @@ public async Task DebuggerBreaksWhenRequested()
489478
AssertDebuggerPaused();
490479
}
491480

492-
[Trait("Category", "DebugService")]
493481
[Fact]
494482
public async Task DebuggerRunsCommandsWhileStopped()
495483
{
@@ -504,7 +492,6 @@ public async Task DebuggerRunsCommandsWhileStopped()
504492
Assert.Equal(17, (await executeTask.ConfigureAwait(true))[0]);
505493
}
506494

507-
[Trait("Category", "DebugService")]
508495
[Fact]
509496
public async Task DebuggerVariableStringDisplaysCorrectly()
510497
{
@@ -523,7 +510,6 @@ await debugService.SetLineBreakpointsAsync(
523510
Assert.False(var.IsExpandable);
524511
}
525512

526-
[Trait("Category", "DebugService")]
527513
[Fact]
528514
public async Task DebuggerGetsVariables()
529515
{
@@ -573,7 +559,6 @@ await debugService.SetLineBreakpointsAsync(
573559
Assert.Equal("$false", falseVar.ValueString);
574560
}
575561

576-
[Trait("Category", "DebugService")]
577562
[Fact]
578563
public async Task DebuggerSetsVariablesNoConversion()
579564
{
@@ -628,7 +613,6 @@ await debugService.SetLineBreakpointsAsync(
628613
Assert.Equal(newGlobalIntValue, intGlobalVar.ValueString);
629614
}
630615

631-
[Trait("Category", "DebugService")]
632616
[Fact(Skip = "Variable conversion is broken")]
633617
public async Task DebuggerSetsVariablesWithConversion()
634618
{
@@ -687,7 +671,6 @@ await debugService.SetLineBreakpointsAsync(
687671
Assert.Equal(newGlobalValue, globalVar.ValueString);
688672
}
689673

690-
[Trait("Category", "DebugService")]
691674
[Fact]
692675
public async Task DebuggerVariableEnumDisplaysCorrectly()
693676
{
@@ -708,7 +691,6 @@ await debugService.SetLineBreakpointsAsync(
708691
Assert.False(var.IsExpandable);
709692
}
710693

711-
[Trait("Category", "DebugService")]
712694
[Fact]
713695
public async Task DebuggerVariableHashtableDisplaysCorrectly()
714696
{
@@ -745,7 +727,6 @@ await debugService.SetLineBreakpointsAsync(
745727
}
746728
}
747729

748-
[Trait("Category", "DebugService")]
749730
[Fact]
750731
public async Task DebuggerVariableNullStringDisplaysCorrectly()
751732
{
@@ -766,7 +747,6 @@ await debugService.SetLineBreakpointsAsync(
766747
Assert.True(nullStringVar.IsExpandable);
767748
}
768749

769-
[Trait("Category", "DebugService")]
770750
[Fact]
771751
public async Task DebuggerVariablePSObjectDisplaysCorrectly()
772752
{
@@ -794,7 +774,6 @@ await debugService.SetLineBreakpointsAsync(
794774
Assert.Equal("\"John\"", childVars["Name"]);
795775
}
796776

797-
[Trait("Category", "DebugService")]
798777
[Fact]
799778
public async Task DebuggerVariablePSCustomObjectDisplaysCorrectly()
800779
{
@@ -824,7 +803,6 @@ await debugService.SetLineBreakpointsAsync(
824803

825804
// Verifies fix for issue #86, $proc = Get-Process foo displays just the ETS property set
826805
// and not all process properties.
827-
[Trait("Category", "DebugService")]
828806
[Fact(Skip = "Length of child vars is wrong now")]
829807
public async Task DebuggerVariableProcessObjDisplaysCorrectly()
830808
{

0 commit comments

Comments
 (0)