public virtual void NumericUpDownPeerSupportsRangeValue() { NumericUpDown item = new NumericUpDown(); NumericUpDownAutomationPeer peer = null; IRangeValueProvider provider = null; TestAsync( item, () => peer = FrameworkElementAutomationPeer.CreatePeerForElement(item) as NumericUpDownAutomationPeer, () => provider = peer.GetPattern(PatternInterface.RangeValue) as IRangeValueProvider, () => Assert.IsNotNull(provider, "IRangeValueProvider peer should not be null!")); }
public virtual void NumericUpDownPeerSupportsRangeValueAndValue() { NumericUpDown item = new NumericUpDown(); NumericUpDownAutomationPeer peer = null; TestAsync( item, () => peer = FrameworkElementAutomationPeer.CreatePeerForElement(item) as NumericUpDownAutomationPeer, () => Assert.IsNull(peer.GetPattern(PatternInterface.Dock), "NumericUpDownAutomationPeer should not support the Dock pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.ExpandCollapse), "NumericUpDownAutomationPeer should not support the ExpandCollapse pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.Grid), "NumericUpDownAutomationPeer should not support the Grid pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.GridItem), "NumericUpDownAutomationPeer should not support the GridItem pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.Invoke), "NumericUpDownAutomationPeer should not support the Dock pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.MultipleView), "NumericUpDownAutomationPeer should not support the MultipleView pattern!"), () => Assert.IsNotNull(peer.GetPattern(PatternInterface.RangeValue), "NumericUpDownAutomationPeer should support the RangeValue pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.Scroll), "NumericUpDownAutomationPeer should not support the Scroll pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.ScrollItem), "NumericUpDownAutomationPeer should not support the ScrollItem pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.Selection), "NumericUpDownAutomationPeer should not support the Selection pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.Table), "NumericUpDownAutomationPeer should not support the Table pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.TableItem), "NumericUpDownAutomationPeer should not support the TableItem pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.Toggle), "NumericUpDownAutomationPeer should not support the Toggle pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.Transform), "NumericUpDownAutomationPeer should not support the Transform pattern!"), () => Assert.IsNotNull(peer.GetPattern(PatternInterface.Value), "NumericUpDownAutomationPeer should support the Value pattern!"), () => Assert.IsNull(peer.GetPattern(PatternInterface.Window), "NumericUpDownAutomationPeer should not support the Window pattern!")); }