public void HScrollBarAccessibleObject_GetChild_ReturnExpected_HandleIsNotCreated(RightToLeft rightToLeft, int minimum, int maximum, int value) { using HScrollBar scrollBar = GetHScrollBar(createControl: false, rightToLeft, minimum, maximum, value); ScrollBarAccessibleObject accessibleObject = (ScrollBarAccessibleObject)scrollBar.AccessibilityObject; Assert.Null(accessibleObject.GetChild(-1)); Assert.Null(accessibleObject.GetChild(0)); Assert.Null(accessibleObject.GetChild(1)); Assert.Null(accessibleObject.GetChild(2)); Assert.Null(accessibleObject.GetChild(3)); Assert.Null(accessibleObject.GetChild(4)); Assert.Null(accessibleObject.GetChild(5)); Assert.False(scrollBar.IsHandleCreated); }
public void HScrollBarAccessibleObject_GetChild_ReturnExpected_MinimumEqualsMaximum(RightToLeft rightToLeft, int minimum, int maximum, int value) { using HScrollBar scrollBar = GetHScrollBar(createControl: true, rightToLeft, minimum, maximum, value); ScrollBarAccessibleObject accessibleObject = (ScrollBarAccessibleObject)scrollBar.AccessibilityObject; Assert.Null(accessibleObject.GetChild(-1)); Assert.Equal(accessibleObject.FirstLineButtonAccessibleObject, accessibleObject.GetChild(0)); Assert.Equal(accessibleObject.ThumbAccessibleObject, accessibleObject.GetChild(1)); Assert.Equal(accessibleObject.LastLineButtonAccessibleObject, accessibleObject.GetChild(2)); Assert.Null(accessibleObject.GetChild(3)); Assert.Null(accessibleObject.GetChild(4)); Assert.Null(accessibleObject.GetChild(5)); Assert.True(scrollBar.IsHandleCreated); }