public void TestFormsTreeNodeGetItemIndexs() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); FormsTreeNode item = treeView1.GetItem(0, 1); Assert.AreEqual(@"Child 2", item.Text); }
/// <summary> /// FormsTreeNode GetItem(params string[] keys)のテスト /// </summary> public void TestFormsTreeNodeGetItemKeys() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); FormsTreeNode item = treeView1.GetItem(@"Parent", @"Child 2", @"GrandChild"); Assert.AreEqual(@"GrandChild", item.Text); }
public void TestChecked() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); FormsTreeNode item = treeView1.FindItem("Parent"); item.EmulateCheck(true); Assert.AreEqual(true, item.Checked); }
public void TestIsExpanded() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); FormsTreeNode item = treeView1.FindItem("Parent"); item.EmulateExpand(); Assert.AreEqual(true, item.IsExpanded); }
public void TestFormsTreeNodeSelect() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); treeView1.FindItem("Parent", "Child 1").EmulateSelect(); FormsTreeNode selectedNode = treeView1.SelectNode; Assert.AreEqual("Child 1", selectedNode.Text); }
public void TestFormsTreeNodeFindItemTexts() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); string[] texts = { @"Parent" }; FormsTreeNode item = treeView1.FindItem(texts); Assert.AreEqual(@"Parent", item.Text); }
public void TestStringText() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); FormsTreeNode item = treeView1.FindItem("Parent"); treeView1.EmulateNodeSelect(item); FormsTreeNode selectitem = treeView1.SelectNode; Assert.AreEqual("Parent", selectitem.Text); }
public void TestEmulateCollapse() { //非同期 FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); app[GetType(), "TreeViewAfterCollapse"](treeView1.AppVar); FormsTreeNode item = treeView1.FindItem("Parent"); item.EmulateCollapse(new Async()); new NativeMessageBox(testDlg.WaitForNextModal()).EmulateButtonClick("OK"); Assert.AreEqual(false, item.IsExpanded); }
public void TestEmulateEditLabel() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); FormsTreeNode item = treeView1.FindItem("Parent"); item.EmulateEditLabel(@"ChangeText"); Assert.AreEqual(@"ChangeText", item.Text); //非同期 app[GetType(), "TreeViewAfterLabelEditEvent"](treeView1.AppVar); item.EmulateEditLabel(@"Parent", new Async()); new NativeMessageBox(testDlg.WaitForNextModal()).EmulateButtonClick("OK"); Assert.AreEqual(@"Parent", item.Text); }
public void TestNodeEmulateSelect() { FormsTreeView treeView1 = new FormsTreeView(testDlg["treeView1"]()); treeView1.FindItem("Parent").EmulateSelect(); FormsTreeNode selectitem = treeView1.SelectNode; Assert.AreEqual("Parent", selectitem.Text); //非同期 app[GetType(), "TreeViewAfterSelectEvent"](treeView1.AppVar); treeView1.GetItem(0, 1).EmulateSelect(new Async()); new NativeMessageBox(testDlg.WaitForNextModal()).EmulateButtonClick("OK"); FormsTreeNode selectitem2 = treeView1.SelectNode; Assert.AreEqual("Child 2", selectitem2.Text); }