mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
committed by
GitHub
parent
4281030361
commit
62ec263b02
@@ -1828,5 +1828,28 @@ namespace Terminal.Gui.Views {
|
||||
Assert.True (sbQuiting);
|
||||
Assert.False (tfQuiting);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[AutoInitShutdown]
|
||||
public void WindowDispose_CanFocusProblem ()
|
||||
{
|
||||
// Arrange
|
||||
Application.Init();
|
||||
using var top = Toplevel.Create();
|
||||
using var view = new View (
|
||||
x: 0,
|
||||
y: 1,
|
||||
text: nameof (WindowDispose_CanFocusProblem));
|
||||
using var window = new Window ();
|
||||
top.Add(window);
|
||||
window.Add (view);
|
||||
|
||||
// Act
|
||||
Application.Begin(top);
|
||||
Application.Shutdown ();
|
||||
|
||||
// Assert does Not throw NullReferenceException
|
||||
top.SetFocus ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user