|
13 | 13 | using Microsoft.PowerShell.EditorServices.Services.Extension;
|
14 | 14 | using Microsoft.PowerShell.EditorServices.Services.PowerShell.Host;
|
15 | 15 | using Microsoft.PowerShell.EditorServices.Services.TextDocument;
|
| 16 | +using Microsoft.PowerShell.EditorServices.Test; |
16 | 17 | using Microsoft.PowerShell.EditorServices.Test.Shared;
|
17 | 18 | using Xunit;
|
18 | 19 |
|
19 |
| -namespace Microsoft.PowerShell.EditorServices.Test.Extensions |
| 20 | +namespace PowerShellEditorServices.Test.Extensions |
20 | 21 | {
|
21 | 22 | [Trait("Category", "Extensions")]
|
22 | 23 | public class ExtensionCommandTests : IDisposable
|
@@ -59,7 +60,7 @@ public async Task CanRegisterAndInvokeCommandWithCmdletName()
|
59 | 60 | BufferRange.None);
|
60 | 61 |
|
61 | 62 | EditorCommand commandAdded = null;
|
62 |
| - extensionCommandService.CommandAdded += (object _, EditorCommand command) => commandAdded = command; |
| 63 | + extensionCommandService.CommandAdded += (_, command) => commandAdded = command; |
63 | 64 |
|
64 | 65 | const string commandName = "test.function";
|
65 | 66 | const string commandDisplayName = "Function extension";
|
@@ -95,7 +96,7 @@ public async Task CanRegisterAndInvokeCommandWithScriptBlock()
|
95 | 96 | BufferRange.None);
|
96 | 97 |
|
97 | 98 | EditorCommand commandAdded = null;
|
98 |
| - extensionCommandService.CommandAdded += (object _, EditorCommand command) => commandAdded = command; |
| 99 | + extensionCommandService.CommandAdded += (_, command) => commandAdded = command; |
99 | 100 |
|
100 | 101 | const string commandName = "test.scriptblock";
|
101 | 102 | const string commandDisplayName = "ScriptBlock extension";
|
@@ -126,7 +127,7 @@ await psesHost.ExecutePSCommandAsync(
|
126 | 127 | public async Task CanUpdateRegisteredCommand()
|
127 | 128 | {
|
128 | 129 | EditorCommand updatedCommand = null;
|
129 |
| - extensionCommandService.CommandUpdated += (object _, EditorCommand command) => updatedCommand = command; |
| 130 | + extensionCommandService.CommandUpdated += (_, command) => updatedCommand = command; |
130 | 131 |
|
131 | 132 | const string commandName = "test.function";
|
132 | 133 | const string commandDisplayName = "Updated function extension";
|
@@ -160,7 +161,7 @@ public async Task CanUnregisterCommand()
|
160 | 161 | const string commandDisplayName = "ScriptBlock extension";
|
161 | 162 |
|
162 | 163 | EditorCommand removedCommand = null;
|
163 |
| - extensionCommandService.CommandRemoved += (object _, EditorCommand command) => removedCommand = command; |
| 164 | + extensionCommandService.CommandRemoved += (_, command) => removedCommand = command; |
164 | 165 |
|
165 | 166 | // Add the command and wait for the add event
|
166 | 167 | await psesHost.ExecutePSCommandAsync(
|
|
0 commit comments