Skip to content

Commit

Permalink
Simplify application of Trait in DebugServiceTests
Browse files Browse the repository at this point in the history
  • Loading branch information
andyleejordan committed Dec 28, 2021
1 parent 44a179c commit 76a5791
Showing 1 changed file with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using Xunit;
namespace Microsoft.PowerShell.EditorServices.Test.Debugging
{
[Trait("Category", "DebugService")]
public class DebugServiceTests : IDisposable
{
private readonly PsesInternalHost psesHost;
Expand Down Expand Up @@ -133,7 +134,6 @@ private Task<IReadOnlyList<LineBreakpoint>> GetConfirmedBreakpoints(ScriptFile s
CancellationToken.None);
}

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

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerAcceptsScriptArgs()
{
Expand Down Expand Up @@ -224,7 +223,6 @@ public async Task DebuggerAcceptsScriptArgs()
Assert.Equal("\"Extra1\"", childVars[0].ValueString);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerSetsAndClearsFunctionBreakpoints()
{
Expand All @@ -250,7 +248,6 @@ public async Task DebuggerSetsAndClearsFunctionBreakpoints()
Assert.Empty(breakpoints);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerStopsOnFunctionBreakpoints()
{
Expand Down Expand Up @@ -283,7 +280,6 @@ public async Task DebuggerStopsOnFunctionBreakpoints()
Assert.Equal("2", i.ValueString);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerSetsAndClearsLineBreakpoints()
{
Expand Down Expand Up @@ -317,7 +313,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Empty(remainingBreakpoints);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerStopsOnLineBreakpoints()
{
Expand All @@ -334,7 +329,6 @@ await debugService.SetLineBreakpointsAsync(
AssertDebuggerStopped(debugScriptFile.FilePath, 7);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerStopsOnConditionalBreakpoints()
{
Expand Down Expand Up @@ -374,7 +368,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Equal($"{breakpointValue2}", i.ValueString);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerStopsOnHitConditionBreakpoint()
{
Expand All @@ -399,7 +392,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Equal($"{hitCount}", i.ValueString);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerStopsOnConditionalAndHitConditionBreakpoint()
{
Expand All @@ -423,7 +415,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Equal("10", i.ValueString);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerProvidesMessageForInvalidConditionalBreakpoint()
{
Expand Down Expand Up @@ -452,7 +443,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Contains("Unexpected token '-ez'", breakpoints[0].Message);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerFindsParseableButInvalidSimpleBreakpointConditions()
{
Expand All @@ -475,7 +465,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Contains("Use '-gt' instead of '>'", breakpoints[1].Message);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerBreaksWhenRequested()
{
Expand All @@ -487,7 +476,6 @@ public async Task DebuggerBreaksWhenRequested()
AssertDebuggerPaused();
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerRunsCommandsWhileStopped()
{
Expand All @@ -502,7 +490,6 @@ public async Task DebuggerRunsCommandsWhileStopped()
Assert.Equal(17, (await executeTask.ConfigureAwait(true))[0]);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerVariableStringDisplaysCorrectly()
{
Expand All @@ -522,7 +509,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.False(var.IsExpandable);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerGetsVariables()
{
Expand Down Expand Up @@ -573,7 +559,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Equal("$false", falseVar.ValueString);
}

[Trait("Category", "DebugService")]
[Fact(Skip = "Variable setting is broken")]
public async Task DebuggerSetsVariablesNoConversion()
{
Expand Down Expand Up @@ -634,7 +619,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Equal(newGlobalIntValue, intGlobalVar.ValueString);
}

[Trait("Category", "DebugService")]
[Fact(Skip = "Variable setting is broken")]
public async Task DebuggerSetsVariablesWithConversion()
{
Expand Down Expand Up @@ -698,7 +682,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Equal(newGlobalValue, globalVar.ValueString);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerVariableEnumDisplaysCorrectly()
{
Expand All @@ -719,7 +702,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.False(var.IsExpandable);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerVariableHashtableDisplaysCorrectly()
{
Expand Down Expand Up @@ -756,7 +738,6 @@ await debugService.SetLineBreakpointsAsync(
}
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerVariableNullStringDisplaysCorrectly()
{
Expand All @@ -777,7 +758,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.True(nullStringVar.IsExpandable);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerVariablePSObjectDisplaysCorrectly()
{
Expand Down Expand Up @@ -805,7 +785,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Equal("\"John\"", childVars["Name"]);
}

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerVariablePSCustomObjectDisplaysCorrectly()
{
Expand Down Expand Up @@ -835,7 +814,6 @@ await debugService.SetLineBreakpointsAsync(

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

0 comments on commit 76a5791

Please sign in to comment.