public void TextBoxBaseUiaTextProvider_RangeFromPoint_ReturnsNull_WithoutHandle(Point point) { using TextBoxBase textBoxBase = new SubTextBoxBase(); TextBoxBaseUiaTextProvider provider = new TextBoxBaseUiaTextProvider(textBoxBase); UiaTextRange textRangeProvider = provider.RangeFromPoint(point) as UiaTextRange; Assert.Null(textRangeProvider); Assert.False(textBoxBase.IsHandleCreated); }
public void TextBoxBaseUiaTextProvider_RangeFromPoint_DoesntThrowAnException(Point point) { using TextBoxBase textBoxBase = new SubTextBoxBase(); textBoxBase.CreateControl(); TextBoxBaseUiaTextProvider provider = new TextBoxBaseUiaTextProvider(textBoxBase); UiaTextRange textRangeProvider = provider.RangeFromPoint(point) as UiaTextRange; Assert.NotNull(textRangeProvider); Assert.True(textBoxBase.IsHandleCreated); }