mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 09:47:58 +01:00
Made unit tests more resiliant to config changes
This commit is contained in:
@@ -622,6 +622,11 @@ public class FileDialogTests (ITestOutputHelper output)
|
||||
|
||||
private FileDialog GetWindowsDialog ()
|
||||
{
|
||||
// Override CM
|
||||
Window.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
|
||||
// Arrange
|
||||
var fileSystem = new MockFileSystem (new Dictionary<string, MockFileData> (), @"c:\");
|
||||
fileSystem.MockTime (() => new (2010, 01, 01, 11, 12, 43));
|
||||
|
||||
@@ -362,6 +362,11 @@ public class MenuBarTests (ITestOutputHelper output)
|
||||
[AutoInitShutdown]
|
||||
public void Draw_A_Menu_Over_A_Dialog ()
|
||||
{
|
||||
// Override CM
|
||||
Window.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
|
||||
Toplevel top = new ();
|
||||
var win = new Window ();
|
||||
top.Add (win);
|
||||
@@ -590,6 +595,11 @@ public class MenuBarTests (ITestOutputHelper output)
|
||||
[AutoInitShutdown]
|
||||
public void Draw_A_Menu_Over_A_Top_Dialog ()
|
||||
{
|
||||
// Override CM
|
||||
Window.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
|
||||
((FakeDriver)Application.Driver).SetBufferSize (40, 15);
|
||||
|
||||
Assert.Equal (new (0, 0, 40, 15), Application.Driver.Clip);
|
||||
|
||||
Reference in New Issue
Block a user