public void HScrollBarAccessibleObject_GetChildCount_ReturnsMunisOne_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.Equal(-1, accessibleObject.GetChildCount()); Assert.False(scrollBar.IsHandleCreated); }
public void HScrollBarAccessibleObject_GetChildCount_ReturnsThree_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.Equal(3, accessibleObject.GetChildCount()); Assert.True(scrollBar.IsHandleCreated); }
public void HScrollBarAccessibleObject_GetChildCount_ReturnsFour_LastPageButtonIsHidden(RightToLeft rightToLeft, int minimum, int maximum, int value) { using HScrollBar scrollBar = GetHScrollBar(createControl: true, rightToLeft, minimum, maximum, value); ScrollBarAccessibleObject accessibleObject = (ScrollBarAccessibleObject)scrollBar.AccessibilityObject; Assert.Equal(4, accessibleObject.GetChildCount()); Assert.True(scrollBar.IsHandleCreated); }
public void HScrollBarAccessibleObject_GetChildCount_ReturnsFive_AllButtonsAreDisplayed(RightToLeft rightToLeft, int minimum, int maximum, int value) { using HScrollBar scrollBar = GetHScrollBar(createControl: true, rightToLeft, minimum, maximum, value); ScrollBarAccessibleObject accessibleObject = (ScrollBarAccessibleObject)scrollBar.AccessibilityObject; Assert.Equal(5, accessibleObject.GetChildCount()); Assert.True(scrollBar.IsHandleCreated); }
public void HScrollBarAccessibleObject_Name_Get_ReturnsExpected(string accessibleName) { using HScrollBar scrollBar = new(); scrollBar.AccessibleName = accessibleName; ScrollBarAccessibleObject accessibleObject = Assert.IsType <ScrollBarAccessibleObject>(scrollBar.AccessibilityObject); Assert.Equal(accessibleName, accessibleObject.Name); Assert.False(scrollBar.IsHandleCreated); }
public void HScrollBarAccessibleObject_Description_Get_ReturnsExpected(string accessibleDescription) { using HScrollBar scrollBar = new(); scrollBar.AccessibleDescription = accessibleDescription; ScrollBarAccessibleObject accessibleObject = Assert.IsType <ScrollBarAccessibleObject>(scrollBar.AccessibilityObject); Assert.Equal(accessibleDescription, accessibleObject.Description); Assert.False(scrollBar.IsHandleCreated); }
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); }