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 Jan 5, 2022
1 parent 4997f67 commit 57bdb36
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 @@ -141,7 +142,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 @@ -170,7 +170,6 @@ await debugService.SetCommandBreakpointsAsync(
Assert.Equal("[ArrayList: 0]", var.ValueString);
}

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

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

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

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

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

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

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

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

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

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

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

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

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerVariableStringDisplaysCorrectly()
{
Expand All @@ -523,7 +510,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]
public async Task DebuggerSetsVariablesNoConversion()
{
Expand Down Expand Up @@ -628,7 +613,6 @@ await debugService.SetLineBreakpointsAsync(
Assert.Equal(newGlobalIntValue, intGlobalVar.ValueString);
}

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

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

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

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

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

[Trait("Category", "DebugService")]
[Fact]
public async Task DebuggerVariablePSCustomObjectDisplaysCorrectly()
{
Expand Down Expand Up @@ -824,7 +803,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 57bdb36

Please sign in to comment.