public void TestgetSelectedNode01() { using (OPCDataSelector oPCDataSelector = OPCDataSelectorFactory.CreateOPCDataSelector01()) { TreeNode treeNode = oPCDataSelector.getSelectedNode(); } }
public void TestDisplay_getSelectedNode_LoadDataNodeChildren() { Dictionary <ulong, EtyEntity> entityMap = new Dictionary <ulong, EtyEntity>(); EtyEntity e1 = new EtyEntity(); e1.Name = "test1"; e1.Pkey = 1; EtyEntity e2 = new EtyEntity(); e2.Name = "test2"; e2.Pkey = 2; entityMap.Add(1, e1); entityMap.Add(2, e2); oPCDataSelector.Display(entityMap); oPCDataSelector.getSelectedNode(); Accessor oPCDataSelectorAccessor = ReflectionAccessor.Wrap(oPCDataSelector); System.Windows.Forms.TreeView treeOpcItems = (System.Windows.Forms.TreeView)(oPCDataSelectorAccessor.GetField("treeOpcItems")); TreeNode treeNode = treeOpcItems.Nodes[0]; oPCDataSelector.LoadDataNodeChildren(ref treeNode, entityMap); }