UiaAtkBridgeTest.AtkTests.ChildMenu C# (CSharp) Method

ChildMenu() private method

private ChildMenu ( ) : void
return void
		public void ChildMenu () 
		{
			BasicWidgetType type = BasicWidgetType.ChildMenu;
			Atk.Object accessible = null;
			
			string menuName = simpleTestText;

			List <MenuLayout> menu = new List <MenuLayout> ();
			menu.Add (new MenuLayout ("File", new MenuLayout ("New...", new MenuLayout (menuName), new MenuLayout ("Text")), new MenuLayout ("Quit!")));
			menu.Add (new MenuLayout ("Help", new MenuLayout ("About?")));

			accessible = GetAccessible (type, menu);
			
			Assert.AreEqual (menuName, accessible.Name, "name of the menu is the same as its label");

			PropertyRole (type, accessible);

			Assert.AreEqual (0, accessible.NAccessibleChildren, 
			                 "number of children; children roles:" + DescribeChildren (accessible));

			Interfaces (accessible,
			            typeof (Atk.IComponent),
			            typeof (Atk.IText),
			            typeof (Atk.IAction));

			States (accessible,
			  Atk.StateType.Enabled,
			  Atk.StateType.Selectable, 
			  Atk.StateType.Sensitive,
			  Atk.StateType.Visible);
			
			Atk.IComponent atkComponent = CastToAtkInterface <Atk.IComponent> (accessible);
			InterfaceComponent (type, atkComponent, accessible.RefStateSet ().ContainsState (Atk.StateType.Showing));
			
			Atk.IAction atkAction = CastToAtkInterface <Atk.IAction> (accessible);
			InterfaceAction (type, atkAction, accessible);

			InterfaceText (type, true, accessible);
		}