コード例 #1
0
        public void AddAttribute()
        {
            treeView.SelectedNode = bodyTreeNode;
            treeViewContainer.AddAttributeDialogAttributeNamesReturned.Add("class");
            AddAttributeCommand command = new AddAttributeCommand();
            command.Owner = treeViewContainer;
            command.Run();

            Assert.IsTrue(bodyElement.HasAttribute("class"));
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void AddAttributeWithNullOwner()
 {
     AddAttributeCommand command = new AddAttributeCommand();
     command.Run();
 }