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 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"); }