public override void GetName() { TextBox textbox = new TextBox(); TextBoxAutomationPeerPoker tbap = new TextBoxAutomationPeerPoker(textbox); Assert.AreEqual(String.Empty, tbap.GetName(), "GetName"); Assert.AreEqual(String.Empty, tbap.GetNameCore_(), "GetNameCore"); string textBlockname = "Textbox name!"; textbox.Text = textBlockname; Assert.AreEqual(textBlockname, tbap.GetName(), "GetName #1"); Assert.AreEqual(textBlockname, tbap.GetNameCore_(), "GetNameCore #1"); textbox.Text = string.Empty; Assert.AreEqual(string.Empty, tbap.GetName(), "GetName #2"); Assert.AreEqual(string.Empty, tbap.GetNameCore_(), "GetNameCore #2"); }
public override void GetPattern() { TextBoxAutomationPeerPoker tbap = new TextBoxAutomationPeerPoker(new TextBox()); Assert.IsNull(tbap.GetPattern(PatternInterface.Dock), "Dock"); Assert.IsNull(tbap.GetPattern(PatternInterface.ExpandCollapse), "ExpandCollapse"); Assert.IsNull(tbap.GetPattern(PatternInterface.Grid), "Grid"); Assert.IsNull(tbap.GetPattern(PatternInterface.GridItem), "GridItem"); Assert.IsNull(tbap.GetPattern(PatternInterface.Invoke), "Invoke"); Assert.IsNull(tbap.GetPattern(PatternInterface.MultipleView), "MultipleView"); Assert.IsNull(tbap.GetPattern(PatternInterface.RangeValue), "RangeValue"); Assert.IsNull(tbap.GetPattern(PatternInterface.Scroll), "Scroll"); Assert.IsNull(tbap.GetPattern(PatternInterface.ScrollItem), "ScrollItem"); Assert.IsNull(tbap.GetPattern(PatternInterface.Selection), "Selection"); Assert.IsNull(tbap.GetPattern(PatternInterface.SelectionItem), "SelectionItem"); Assert.IsNull(tbap.GetPattern(PatternInterface.Table), "Table"); Assert.IsNull(tbap.GetPattern(PatternInterface.TableItem), "TableItem"); Assert.IsNull(tbap.GetPattern(PatternInterface.Toggle), "Toggle"); Assert.IsNull(tbap.GetPattern(PatternInterface.Transform), "Transform"); Assert.IsNull(tbap.GetPattern(PatternInterface.Window), "Window"); Assert.IsNotNull(tbap.GetPattern(PatternInterface.Value), "Value"); }
public override void GetPattern () { TextBoxAutomationPeerPoker tbap = new TextBoxAutomationPeerPoker (new TextBox ()); Assert.IsNull (tbap.GetPattern (PatternInterface.Dock), "Dock"); Assert.IsNull (tbap.GetPattern (PatternInterface.ExpandCollapse), "ExpandCollapse"); Assert.IsNull (tbap.GetPattern (PatternInterface.Grid), "Grid"); Assert.IsNull (tbap.GetPattern (PatternInterface.GridItem), "GridItem"); Assert.IsNull (tbap.GetPattern (PatternInterface.Invoke), "Invoke"); Assert.IsNull (tbap.GetPattern (PatternInterface.MultipleView), "MultipleView"); Assert.IsNull (tbap.GetPattern (PatternInterface.RangeValue), "RangeValue"); Assert.IsNull (tbap.GetPattern (PatternInterface.Scroll), "Scroll"); Assert.IsNull (tbap.GetPattern (PatternInterface.ScrollItem), "ScrollItem"); Assert.IsNull (tbap.GetPattern (PatternInterface.Selection), "Selection"); Assert.IsNull (tbap.GetPattern (PatternInterface.SelectionItem), "SelectionItem"); Assert.IsNull (tbap.GetPattern (PatternInterface.Table), "Table"); Assert.IsNull (tbap.GetPattern (PatternInterface.TableItem), "TableItem"); Assert.IsNull (tbap.GetPattern (PatternInterface.Toggle), "Toggle"); Assert.IsNull (tbap.GetPattern (PatternInterface.Transform), "Transform"); Assert.IsNull (tbap.GetPattern (PatternInterface.Window), "Window"); Assert.IsNotNull (tbap.GetPattern (PatternInterface.Value), "Value"); }
public override void GetName() { TextBox textbox = new TextBox (); TextBoxAutomationPeerPoker tbap = new TextBoxAutomationPeerPoker (textbox); Assert.AreEqual (String.Empty, tbap.GetName(), "GetName"); Assert.AreEqual (String.Empty, tbap.GetNameCore_(), "GetNameCore"); string textBlockname = "Textbox name!"; textbox.Text = textBlockname; Assert.AreEqual (textBlockname, tbap.GetName (), "GetName #1"); Assert.AreEqual (textBlockname, tbap.GetNameCore_ (), "GetNameCore #1"); textbox.Text = string.Empty; Assert.AreEqual (string.Empty, tbap.GetName (), "GetName #2"); Assert.AreEqual (string.Empty, tbap.GetNameCore_ (), "GetNameCore #2"); }