System\Windows\Forms\TreeNodeCollectionTests.cs (11)
178Assert.Equal([child2, child3, grandchild2, grandchild3], collection.Find(key, searchAllChildren: true));
181Assert.Equal([child2, child3, grandchild2, grandchild3], collection.Find(key, searchAllChildren: true));
184Assert.Equal([child2, child3], collection.Find(key, searchAllChildren: false));
187Assert.Equal([child2, child3], collection.Find(key, searchAllChildren: false));
215Assert.Empty(collection.Find(key, searchAllChildren: true));
216Assert.Empty(collection.Find(key, searchAllChildren: false));
263TreeNode treeNode = treeView.Nodes.Find(key, searchAllChildren: true)[0];
313treeNode = treeView2.Nodes.Find("2", searchAllChildren: true)[0];
329treeNode = treeView3.Nodes.Find("2", searchAllChildren: true)[0];
340Assert.Throws<ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: true));
341Assert.Throws<ArgumentNullException>("key", () => collection.Find(key, searchAllChildren: false));