public void AddAttribute() { treeView.SelectedNode = bodyTreeNode; treeViewContainer.AddAttributeDialogAttributeNamesReturned.Add("class"); AddAttributeCommand command = new AddAttributeCommand(); command.Owner = treeViewContainer; command.Run(); Assert.IsTrue(bodyElement.HasAttribute("class")); }
public void AddAttributeDialogCancelled() { treeView.SelectedNode = bodyTreeNode; treeView.SelectedNode = bodyTreeNode; treeViewContainer.AddAttributeDialogAttributeNamesReturned.Add("class"); treeViewContainer.AddAttributeDialogResult = DialogResult.Cancel; AddAttributeCommand command = new AddAttributeCommand(); string[] attributes = treeViewContainer.SelectNewAttributes(new string[] {"a"}); Assert.AreEqual(0, attributes.Length); }
public void AddAttributeWithNullOwner() { AddAttributeCommand command = new AddAttributeCommand(); command.Run(); }