public void GetItemIntTest2() { var tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem(1).GetItem(0, 1); Assert.AreEqual("1-0-1", item.Text); }
public void GetItemStringTest2() { var tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem("1").GetItem("1-0", "1-0-1"); Assert.AreEqual("1-0-1", item.Text); }
public void GetItemDriverTest() { var tree = new WPFTreeView <ItemControlDriver>(_ctrl._tree); WPFTreeViewItem item0 = new WPFTreeViewItem(_ctrl._item0); item0.EmulateChangeSelected(true); Assert.AreEqual("item0", tree.GetItemDriver("item0").Text.Text); }
public void HeaderContentTest() { WPFTreeView tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem(1); var button = new WPFButtonBase(item.HeaderContent.VisualTree().ByType <Button>().Single()); button.EmulateClick(); Assert.IsTrue((bool)_ctrl.treeButtonClicked); }
public void GetCoreElementTest() { WPFTreeView tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem(1); var button = new WPFButtonBase(item.GetCoreElement(typeof(Button).FullName)); button.EmulateClick(); Assert.IsTrue((bool)_ctrl.treeButtonClicked); }
public void GetCoreElementNotFoundTest() { TestUtility.TestExceptionMessage(() => { ResetConnection(); WPFTreeView tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem(1); item.GetCoreElement("X"); }, "The desire Visual element was not found.", "指定のVisual要素は見つかりませんでした。"); }
public void GetItemNotFoundTest() { TestUtility.TestExceptionMessage(() => { ResetConnection(); WPFTreeView tree = new WPFTreeView(_ctrl._tree); tree.GetItem(3); }, "The desire item was not found.", "指定のアイテムは見つかりませんでした。"); }
void Assert(string accessPath, WPFTreeView treeView) { if (treeView.SelectedItem.AppVar.IsNull) { CaptureAdaptor.AddCode($"{accessPath}.SelectedItem.AppVar.IsNull.IsTrue();"); } else { CaptureAdaptor.AddCode($"{accessPath}.SelectedItem.Text.Is({ToLiteral(treeView.SelectedItem.Text)});"); } }
public void GetItemNotFoundTest() { TestUtility.TestExceptionMessage(() => { ResetConnection(); WPFTreeView tree = new WPFTreeView(_ctrl._tree); tree.GetItem(3); }, "The desire item was not found.", "指定のアイテムは見つかりませんでした。"); }
public void TreeViewActiveItemKeyTest() { var treeEx = new WPFTreeView <ItemDriver>(_ctrl._treeView); treeEx.GetItem(0, 2, 1).VisualTree().ByType <TextBox>()[0].Dynamic().Focus(); WPFTextBox textBox = treeEx.GetItem(0, 2, 1).VisualTree().ByType <TextBox>()[0].Dynamic(); textBox.Click(); var keys = treeEx.ActiveItemIndices; Assert.AreEqual(3, keys.Length); Assert.AreEqual(0, keys[0]); Assert.AreEqual(2, keys[1]); Assert.AreEqual(1, keys[2]); }
public void GetItemIntTest() { var tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem(1, 0, 1); Assert.AreEqual("1-0-1", item.Text); }
public void GetItemStringTest() { var tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem("1", "1-0", "1-0-1"); Assert.AreEqual("1-0-1", item.Text); }
public void GetCoreElementNotFoundTest() { TestUtility.TestExceptionMessage(() => { ResetConnection(); WPFTreeView tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem(1); item.GetCoreElement("X"); }, "The desire Visual element was not found.", "指定のVisual要素は見つかりませんでした。"); }
public void HeaderContentTest() { WPFTreeView tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem(1); var button = new WPFButtonBase(item.HeaderContent.VisualTree().ByType<Button>().Single()); button.EmulateClick(); Assert.IsTrue((bool)_ctrl.treeButtonClicked); }
public void GetCoreElementTest() { WPFTreeView tree = new WPFTreeView(_ctrl._tree); var item = tree.GetItem(1); var button = new WPFButtonBase(item.GetCoreElement(typeof(Button).FullName)); button.EmulateClick(); Assert.IsTrue((bool)_ctrl.treeButtonClicked); }