mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
This commit is contained in:
@@ -148,6 +148,30 @@ public class MenuBarTests (ITestOutputHelper output)
|
||||
top.Dispose ();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[AutoInitShutdown]
|
||||
public void CanExecute_False_Does_Not_Throws ()
|
||||
{
|
||||
var menu = new MenuBar
|
||||
{
|
||||
Menus =
|
||||
[
|
||||
new ("File", new MenuItem []
|
||||
{
|
||||
new ("New", "", null, () => false),
|
||||
null,
|
||||
new ("Quit", "", null)
|
||||
})
|
||||
]
|
||||
};
|
||||
var top = new Toplevel ();
|
||||
top.Add (menu);
|
||||
Application.Begin (top);
|
||||
|
||||
Assert.True (menu.NewKeyDownEvent (menu.Key));
|
||||
Assert.True (menu.IsMenuOpen);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
[AutoInitShutdown]
|
||||
public void CanExecute_HotKey ()
|
||||
|
||||
Reference in New Issue
Block a user