public void PropertyGridToolStripAccessibleObject_Ctor_Default() { using PropertyGrid propertyGrid = new PropertyGrid(); using PropertyGridToolStrip propertyGridToolStrip = new PropertyGridToolStrip(propertyGrid); PropertyGridToolStripAccessibleObject accessibleObject = new PropertyGridToolStripAccessibleObject(propertyGridToolStrip, propertyGrid); Assert.Equal(propertyGridToolStrip, accessibleObject.Owner); Assert.False(propertyGrid.IsHandleCreated); Assert.False(propertyGridToolStrip.IsHandleCreated); }
public void PropertyGridToolStripAccessibleObject_Role_IsToolBar_ByDefault() { using PropertyGrid propertyGrid = new PropertyGrid(); using PropertyGridToolStrip propertyGridToolStrip = new PropertyGridToolStrip(propertyGrid); // AccessibleRole is not set = Default AccessibleRole actual = propertyGridToolStrip.AccessibilityObject.Role; Assert.Equal(AccessibleRole.ToolBar, actual); Assert.False(propertyGrid.IsHandleCreated); Assert.False(propertyGridToolStrip.IsHandleCreated); }
public void PropertyGridToolStripAccessibleObject_ControlType_IsToolBar_IfAccessibleRoleIsDefault() { using PropertyGrid propertyGrid = new PropertyGrid(); using PropertyGridToolStrip propertyGridToolStrip = new PropertyGridToolStrip(propertyGrid); // AccessibleRole is not set = Default object actual = propertyGridToolStrip.AccessibilityObject.GetPropertyValue(UiaCore.UIA.ControlTypePropertyId); Assert.Equal(UiaCore.UIA.ToolBarControlTypeId, actual); Assert.False(propertyGrid.IsHandleCreated); Assert.False(propertyGridToolStrip.IsHandleCreated); }