New unit tests. Lots of fixes

This commit is contained in:
Tig
2024-07-15 16:36:05 -06:00
parent 8bf0207171
commit a3b606fe6e
19 changed files with 367 additions and 199 deletions

View File

@@ -394,7 +394,7 @@ public class DrawTests (ITestOutputHelper _output)
var view = new View { Width = 2, Height = 2, BorderStyle = LineStyle.Single };
view.BeginInit ();
view.EndInit ();
view.SetRelativeLayout (Application.Driver.Screen.Size);
view.SetRelativeLayout (Application.Screen.Size);
Assert.Equal (new (0, 0, 2, 2), view.Frame);
Assert.Equal (Rectangle.Empty, view.Viewport);
@@ -419,7 +419,7 @@ public class DrawTests (ITestOutputHelper _output)
view.Border.Thickness = new Thickness (1, 1, 1, 0);
view.BeginInit ();
view.EndInit ();
view.SetRelativeLayout (Application.Driver.Screen.Size);
view.SetRelativeLayout (Application.Screen.Size);
Assert.Equal (new (0, 0, 2, 1), view.Frame);
Assert.Equal (Rectangle.Empty, view.Viewport);
@@ -437,7 +437,7 @@ public class DrawTests (ITestOutputHelper _output)
view.Border.Thickness = new Thickness (0, 1, 1, 1);
view.BeginInit ();
view.EndInit ();
view.SetRelativeLayout (Application.Driver.Screen.Size);
view.SetRelativeLayout (Application.Screen.Size);
Assert.Equal (new (0, 0, 1, 2), view.Frame);
Assert.Equal (Rectangle.Empty, view.Viewport);
@@ -462,7 +462,7 @@ public class DrawTests (ITestOutputHelper _output)
view.Border.Thickness = new Thickness (1, 1, 0, 1);
view.BeginInit ();
view.EndInit ();
view.SetRelativeLayout (Application.Driver.Screen.Size);
view.SetRelativeLayout (Application.Screen.Size);
Assert.Equal (new (0, 0, 1, 2), view.Frame);
Assert.Equal (Rectangle.Empty, view.Viewport);
@@ -488,7 +488,7 @@ public class DrawTests (ITestOutputHelper _output)
view.BeginInit ();
view.EndInit ();
view.SetRelativeLayout (Application.Driver.Screen.Size);
view.SetRelativeLayout (Application.Screen.Size);
Assert.Equal (new (0, 0, 2, 1), view.Frame);
Assert.Equal (Rectangle.Empty, view.Viewport);