This commit is contained in:
David Wengier 2024-10-23 20:06:49 +11:00
Родитель d56e20dd77
Коммит a20ca3e6d2
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -223,7 +223,7 @@ public class ExtractToCodeBehindCodeActionProviderTest(ITestOutputHelper testOut
var codeAction = Assert.Single(commandOrCodeActionContainer);
var razorCodeActionResolutionParams = ((JsonElement)codeAction.Data!).Deserialize<RazorCodeActionResolutionParams>();
Assert.NotNull(razorCodeActionResolutionParams);
var actionParams = ((JsonElement)razorCodeActionResolutionParams.Data).Deserialize<ExtractToCodeBehindCodeActionParams>();
var actionParams = ((JsonElement)razorCodeActionResolutionParams.Data!).Deserialize<ExtractToCodeBehindCodeActionParams>();
Assert.NotNull(actionParams);
Assert.Equal(removeSpan, TextSpan.FromBounds(actionParams.RemoveStart, actionParams.RemoveEnd));
@ -266,7 +266,7 @@ public class ExtractToCodeBehindCodeActionProviderTest(ITestOutputHelper testOut
var codeAction = Assert.Single(commandOrCodeActionContainer);
var razorCodeActionResolutionParams = ((JsonElement)codeAction.Data!).Deserialize<RazorCodeActionResolutionParams>();
Assert.NotNull(razorCodeActionResolutionParams);
var actionParams = ((JsonElement)razorCodeActionResolutionParams.Data).Deserialize<ExtractToCodeBehindCodeActionParams>();
var actionParams = ((JsonElement)razorCodeActionResolutionParams.Data!).Deserialize<ExtractToCodeBehindCodeActionParams>();
Assert.NotNull(actionParams);
Assert.Equal(removeSpan, TextSpan.FromBounds(actionParams.RemoveStart, actionParams.RemoveEnd));
@ -339,7 +339,7 @@ public class ExtractToCodeBehindCodeActionProviderTest(ITestOutputHelper testOut
var codeAction = Assert.Single(commandOrCodeActionContainer);
var razorCodeActionResolutionParams = ((JsonElement)codeAction.Data!).Deserialize<RazorCodeActionResolutionParams>();
Assert.NotNull(razorCodeActionResolutionParams);
var actionParams = ((JsonElement)razorCodeActionResolutionParams.Data).Deserialize<ExtractToCodeBehindCodeActionParams>();
var actionParams = ((JsonElement)razorCodeActionResolutionParams.Data!).Deserialize<ExtractToCodeBehindCodeActionParams>();
Assert.NotNull(actionParams);
Assert.Equal(removeSpan, TextSpan.FromBounds(actionParams.RemoveStart, actionParams.RemoveEnd));

Просмотреть файл

@ -490,7 +490,7 @@ public class ExtractToComponentCodeActionProviderTest(ITestOutputHelper testOutp
var codeAction = Assert.Single(commandOrCodeActionContainer);
var razorCodeActionResolutionParams = ((JsonElement)codeAction.Data!).Deserialize<RazorCodeActionResolutionParams>();
Assert.NotNull(razorCodeActionResolutionParams);
var actionParams = ((JsonElement)razorCodeActionResolutionParams.Data).Deserialize<ExtractToComponentCodeActionParams>();
var actionParams = ((JsonElement)razorCodeActionResolutionParams.Data!).Deserialize<ExtractToComponentCodeActionParams>();
Assert.NotNull(actionParams);
Assert.Equal(resultSpan.Start, actionParams.Start);
Assert.Equal(resultSpan.End, actionParams.End);