mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user