Add SetScreenSize to IConsoleDriver and fix test issues

- Added SetScreenSize(int, int) method to IConsoleDriver interface
- Implemented in ConsoleDriver base class to throw NotImplementedException
- Implemented in ConsoleDriverFacade to throw NotImplementedException
- Overridden in FakeDriver to call SetBufferSize for testing
- Updated all test files to use Application.Driver.SetScreenSize() instead of casting to FakeDriver
- Fixed FakeDriver_MockKeyPresses_Stack_Works test by clearing stack before use
- All tests now pass without casting (21 UnitTests + 16 Parallelizable FakeDriver tests)

Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-26 21:14:01 +00:00
parent ba531af5fd
commit c4a73d71c7
12 changed files with 39 additions and 11 deletions

View File

@@ -3828,7 +3828,7 @@ ssb
[SetupFakeDriver]
public void FillRemaining_True_False ()
{
((FakeDriver)Application.Driver!).SetBufferSize (22, 5);
Application.Driver!.SetScreenSize (22, 5);
Attribute [] attrs =
{
@@ -4050,7 +4050,7 @@ Nice Work")]
Size tfSize = tf.FormatAndGetSize ();
Assert.Equal (new (59, 13), tfSize);
((FakeDriver)Application.Driver).SetBufferSize (tfSize.Width, tfSize.Height);
Application.Driver!.SetScreenSize (tfSize.Width, tfSize.Height);
Application.Driver.FillRect (Application.Screen, (Rune)'*');
tf.Draw (Application.Screen, Attribute.Default, Attribute.Default);