osu.Framework.Tests/Visual/UserInterface/TestCaseNestedMenus.cs
/// <summary>
/// Tests if clicking once on a menu that has <see cref="Menu.TopLevelMenu"/> opens it, and clicking a second time
/// closes it.
/// </summary>
Tests if clicking once on a menu that has  opens it, and clicking a second time
closes it.
Tests if clicking once on a menu that has opens it and clicking a second time closes it .
[Test]
        public void TestDoubleClick()
        {
            AddStep("Click item", () => clickItem(0, 0));
            AddAssert("Check open", () => menus.GetSubMenu(1).State == MenuState.Open);
            AddStep("Click item", () => clickItem(0, 0));
            AddAssert("Check closed", () => menus.GetSubMenu(1)?.State != MenuState.Open);
        }
[ Test ] public void TestDoubleClick ( ) { AddStep ( " " , ( ) => clickItem ( 0 , 0 ) ) ; AddAssert ( " " , ( ) => menus . GetSubMenu ( 1 ) . State == MenuState . Open ) ; AddStep ( " " , ( ) => clickItem ( 0 , 0 ) ) ; AddAssert ( " " , ( ) => menus . GetSubMenu ( 1 ) ? . State != MenuState . Open ) ; }
Tests if clicking once on a menu that has  opens it, and clicking a second time
closes it.
Tests if clicking once on a menu that has opens it and clicking a second time closes it .