Skip to content

Commit 5cb603a

Browse files
committed
Bonus Assertions
1 parent 06136b4 commit 5cb603a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

test/PowerShellEditorServices.Test.Shared/Refactoring/Variables/RefactorVariableTestCases.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ public class RefactorVariableTestCases
88
new ("SimpleVariableAssignment.ps1", Line: 1, Column: 1),
99
new ("VariableCommandParameter.ps1", Line: 3, Column: 17),
1010
new ("VariableCommandParameter.ps1", Line: 10, Column: 9),
11-
new ("VariableCommandParameterSplatted.ps1", Line: 19, Column: 10),
12-
new ("VariableCommandParameterSplatted.ps1", Line: 8, Column: 6),
11+
new ("VariableCommandParameterSplatted.ps1", Line: 16, Column: 5),
12+
new ("VariableCommandParameterSplatted.ps1", Line: 21, Column: 11),
1313
new ("VariableDotNotationFromInnerFunction.ps1", Line: 1, Column: 1),
1414
new ("VariableDotNotationFromInnerFunction.ps1", Line: 11, Column: 26),
1515
new ("VariableInForeachDuplicateAssignment.ps1", Line: 6, Column: 18),

test/PowerShellEditorServices.Test/Refactoring/RenameHandlerTests.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ public async void RenamedFunction(RenameTestTarget s)
6464

6565
ScriptFile scriptFile = workspace.GetFile(testScriptUri);
6666

67+
Assert.NotEmpty(response.Changes[testScriptUri]);
68+
6769
string actual = GetModifiedScript(scriptFile.Contents, response.Changes[testScriptUri].ToArray());
6870

69-
Assert.NotEmpty(response.Changes[testScriptUri]);
7071
Assert.Equal(expected, actual);
7172
}
7273

@@ -85,6 +86,9 @@ public async void RenamedVariable(RenameTestTarget s)
8586

8687
ScriptFile scriptFile = workspace.GetFile(testScriptUri);
8788

89+
Assert.NotNull(response);
90+
Assert.NotEmpty(response.Changes[testScriptUri]);
91+
8892
string actual = GetModifiedScript(scriptFile.Contents, response.Changes[testScriptUri].ToArray());
8993

9094
Assert.Equal(expected, actual);

0 commit comments

Comments
 (0)