refactor: Migrated from Newtonsoft.Json to System.Text.Json, missing one test passing

This commit is contained in:
Denny09310
2025-11-09 12:05:07 +01:00
parent fc69598b09
commit 71ced8db56
80 changed files with 720 additions and 878 deletions

View File

@@ -48,7 +48,7 @@ namespace ElectronNET.IntegrationTests.Tests
this.fx.MainWindow.SetPosition(134, 246);
await Task.Delay(500);
var pos = await this.fx.MainWindow.GetPositionAsync();
pos.Should().BeEquivalentTo(new[] { 134, 246 });
pos.Should().BeEquivalentTo([134, 246]);
}
[Fact]
@@ -134,7 +134,7 @@ namespace ElectronNET.IntegrationTests.Tests
window.WebContents.OnDomReady += () => domReadyTcs.TrySetResult();
await window.WebContents.LoadURLAsync("about:blank");
await domReadyTcs.Task;
await window.WebContents.ExecuteJavaScriptAsync("document.title='NewTitle';");
await window.WebContents.ExecuteJavaScriptAsync<string>("document.title='NewTitle';");
// Wait for event up to a short timeout
var completed2 = await Task.WhenAny(tcs.Task, Task.Delay(3000));