Skip to content

Commit 9c3ac22

Browse files
CopilotJustinGrote
andauthored
Rename test helper to clarify saved-state intent
Agent-Logs-Url: https://github.com/PowerShell/PowerShellEditorServices/sessions/f6b6da25-a6a1-4158-9738-3a65a7e3008e Co-authored-by: JustinGrote <15258962+JustinGrote@users.noreply.github.com>
1 parent 45f719c commit 9c3ac22

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/PowerShellEditorServices.Test/Extensions/EditorOperationsServiceTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public void GetWorkspaceOpenDocumentsTracksEditedAndUntitledSaveStates()
7878
WorkspaceOpenDocument[] editedDocuments = editorOperationsService.GetWorkspaceOpenDocuments();
7979
Assert.Contains(editedDocuments, static document => document.Path.EndsWith("open-saved.ps1") && !document.Saved);
8080

81-
SimulateSaveReset(openSaved);
82-
SimulateSaveReset(openUntitled);
81+
MarkAsSaved(openSaved);
82+
MarkAsSaved(openUntitled);
8383

8484
WorkspaceOpenDocument[] savedDocuments = editorOperationsService.GetWorkspaceOpenDocuments();
8585
Assert.Contains(savedDocuments, static document => document.Path.EndsWith("open-saved.ps1") && document.Saved);
@@ -92,7 +92,7 @@ private static ScriptFile CreateFileBuffer(WorkspaceService workspaceService, st
9292
return workspaceService.GetFileBuffer(DocumentUri.FromFileSystemPath(filePath), initialBuffer: string.Empty);
9393
}
9494

95-
private static void SimulateSaveReset(ScriptFile scriptFile)
95+
private static void MarkAsSaved(ScriptFile scriptFile)
9696
{
9797
scriptFile.IsInMemory = scriptFile.IsUntitled;
9898
}

0 commit comments

Comments
 (0)