예제 #1
0
        public void ProgressBarAccessibilityObject_GetChildCount_ReturnsExpected()
        {
            using var ownerControl = new ProgressBar
                  {
                      Value = 5
                  };
            Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom <Control.ControlAccessibleObject>(ownerControl.AccessibilityObject);
            IAccessible iAccessible = accessibilityObject;

            Assert.Equal(0, iAccessible.accChildCount);
            Assert.Equal(-1, accessibilityObject.GetChildCount());
        }
예제 #2
0
        public void TrackBarAccessibilityObject_GetChildCount_ReturnsExpected(bool createControl, int expectedChildACount)
        {
            using var ownerControl = new TrackBar
                  {
                      Value = 5
                  };

            if (createControl)
            {
                ownerControl.CreateControl();
            }

            Control.ControlAccessibleObject accessibilityObject = Assert.IsAssignableFrom <Control.ControlAccessibleObject>(ownerControl.AccessibilityObject);
            IAccessible iAccessible = accessibilityObject;

            Assert.Equal(expectedChildACount, iAccessible.accChildCount);
            Assert.Equal(-1, accessibilityObject.GetChildCount());
        }