public void AddElementDialogCancelled() { treeView.SelectedNode = bodyTreeNode; treeViewContainer.AddElementDialogElementNamesReturned.Add("p"); treeViewContainer.AddElementDialogResult = DialogResult.Cancel; string[] elements = treeViewContainer.SelectNewElements(new string[] { "a" }); Assert.AreEqual(0, elements.Length); }