Exemple #1
0
        public void MaskedTextBoxAccessibilityObject_Ctor_Default()
        {
            using MaskedTextBox maskedTextBox = new MaskedTextBox();
            maskedTextBox.CreateControl();

            Assert.NotNull(maskedTextBox.AccessibilityObject);
            Assert.True(maskedTextBox.IsHandleCreated);
        }
Exemple #2
0
        public void MaskedTextBoxAccessibilityObject_Role_IsText_ByDefault()
        {
            using MaskedTextBox maskedTextBox = new MaskedTextBox();
            maskedTextBox.CreateControl();
            // AccessibleRole is not set = Default

            AccessibleRole actual = maskedTextBox.AccessibilityObject.Role;

            Assert.Equal(AccessibleRole.Text, actual);
            Assert.True(maskedTextBox.IsHandleCreated);
        }
Exemple #3
0
        public void MaskedTextBoxAccessibilityObject_ControlType_IsEdit_IfAccessibleRoleIsDefault()
        {
            using MaskedTextBox maskedTextBox = new MaskedTextBox();
            maskedTextBox.CreateControl();
            // AccessibleRole is not set = Default

            object actual = maskedTextBox.AccessibilityObject.GetPropertyValue(UiaCore.UIA.ControlTypePropertyId);

            Assert.Equal(UiaCore.UIA.EditControlTypeId, actual);
            Assert.True(maskedTextBox.IsHandleCreated);
        }