test: pass TestContext.Current.CancellationToken at xUnit1051 call sites (analyzer code fix, 451 sites) (lmxopcua#725)

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 13:19:34 -05:00
parent 5db01053e8
commit 1d7a4b7a53
77 changed files with 452 additions and 457 deletions
@@ -106,7 +106,7 @@ public class BrowseTreeViewModelTests
parent.IsExpanded = true;
// Allow async operation to complete
await Task.Delay(50);
await Task.Delay(50, TestContext.Current.CancellationToken);
_service.BrowseCallCount.ShouldBe(initialBrowseCount + 1);
parent.Children.Count.ShouldBe(1);
@@ -131,13 +131,13 @@ public class BrowseTreeViewModelTests
var parent = _vm.RootNodes[0];
parent.IsExpanded = true;
await Task.Delay(50);
await Task.Delay(50, TestContext.Current.CancellationToken);
var browseCountAfterFirst = _service.BrowseCallCount;
parent.IsExpanded = false;
parent.IsExpanded = true;
await Task.Delay(50);
await Task.Delay(50, TestContext.Current.CancellationToken);
_service.BrowseCallCount.ShouldBe(browseCountAfterFirst);
}
@@ -157,7 +157,7 @@ public class BrowseTreeViewModelTests
var parent = _vm.RootNodes[0];
parent.IsExpanded = true;
await Task.Delay(50);
await Task.Delay(50, TestContext.Current.CancellationToken);
// After completion, IsLoading should be false
parent.IsLoading.ShouldBeFalse();