Refactor tests to decouple from global Application state

Commented out `driver ??= Application.Driver` assignments in
`DriverAssert` to prevent automatic global driver assignment.
Removed `Application.ResetState(true)` calls and commented out
state validation assertions in `GlobalTestSetup` to reduce
dependency on global state.

Reintroduced `ApplicationForceDriverTests` and
`ApplicationModelFencingTests` to validate `ForceDriver` behavior
and ensure proper handling of legacy and modern Application
models. Skipped certain `ToAnsiTests` that rely on `Application`.

Removed direct `Application.Driver` assignments in
`ViewDrawingClippingTests` and `ViewDrawingFlowTests`.
Performed general cleanup of redundant code and unused imports
to simplify the codebase.
This commit is contained in:
Tig
2025-11-22 20:53:45 -07:00
parent 4b3cdf71d3
commit 9a5b1c6d2c
7 changed files with 22 additions and 43 deletions

View File

@@ -613,7 +613,6 @@ public class ViewDrawingFlowTests () : FakeDriverBase
IDriver driver = CreateFakeDriver (80, 25);
var initialClip = new Region (driver.Screen);
driver.Clip = initialClip;
Application.Driver = driver;
var view = new View
{
@@ -636,8 +635,6 @@ public class ViewDrawingFlowTests () : FakeDriverBase
// Points inside the view should be excluded
// Note: This test depends on the DrawContext tracking, which may not exclude if nothing was actually drawn
// We're verifying the mechanism exists, not that it necessarily excludes in this specific case
Application.ResetState (true);
}
#endregion