public void TextBoxBaseUiaTextProvider_GetVisibleRanges_ReturnsNull_WithoutHandle(Size size) { using SubTextBoxBase textBoxBase = new SubTextBoxBase() { Text = "Some test text for testing", Size = size }; TextBoxBaseUiaTextProvider provider = new TextBoxBaseUiaTextProvider(textBoxBase); Assert.Null(provider.GetVisibleRanges()); Assert.False(textBoxBase.IsHandleCreated); }
public void TextBoxBaseUiaTextProvider_GetVisibleRanges_ReturnsCorrectValue(Size size) { using SubTextBoxBase textBoxBase = new SubTextBoxBase() { Text = "Some test text for testing", Size = size }; textBoxBase.CreateControl(); TextBoxBaseUiaTextProvider provider = new TextBoxBaseUiaTextProvider(textBoxBase); Assert.NotNull(provider.GetVisibleRanges()); Assert.True(textBoxBase.IsHandleCreated); }