Package net.sourceforge.cruisecontrol.gui.configuration.tree.nodes

Examples of net.sourceforge.cruisecontrol.gui.configuration.tree.nodes.RootNode


    server.addProjectInfo("proj2", proj2Info);
   
    // Construct the ConfigTree to be tested.
    ConfigTree tree = new ConfigTree(server);
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    // Verify that each project node uses the correct schedule node.
    assertEquals(2, root.getChildCount());
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
    ProjectNode proj2 = (ProjectNode) root.getChildAt(1);
   
    tree.expandPath(new TreePath(proj1.getPath()));
    assertEquals(1, proj1.getChildCount());
   
    tree.expandPath(new TreePath(proj2.getPath()));
View Full Code Here


        "<plugin name='a' classname='b' />" +
        "<project name='p'><plugin name='c' classname='d' /></project>" +
        "</cruisecontrol>",
        "p");
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    assertEquals(2, root.getChildCount());
    PluginPluginNode pluginA = (PluginPluginNode) root.getChildAt(0);
    ProjectNode project = (ProjectNode) root.getChildAt(1);
   
    assertEquals("a", pluginA.getAttributeValue("name"));
    assertEquals("b", pluginA.getAttributeValue("classname"));
   
    tree.expandPath(new TreePath(project.getPath()));
View Full Code Here

        "  <svn/>" + // Some permissible children for <modificationset>
         "  <git/>" +
        "</plugin>" +
        "</cruisecontrol>");
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    assertEquals(1, root.getChildCount());
   
    PluginPluginNode plugin = (PluginPluginNode) root.getChildAt(0);
    assertEquals("modificationset", plugin.getAttributeValue("name"));
    assertEquals(ModificationSet.class.getName(), plugin.getAttributeValue("classname"));
    assertEquals(2, plugin.getChildCount());
   
    BasicNode svn = (BasicNode) plugin.getChildAt(0);
View Full Code Here

        "</modificationset></project>" +
        "</cruisecontrol>",
        "Proj1",
        "Proj2");
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    Iterator<Node> iterator = root.childCollection().iterator();
    assertEquals("Proj1", iterator.next().getName());
    assertEquals("Proj2", iterator.next().getName());
    assertFalse(iterator.hasNext());
  }
View Full Code Here

 
  public void testBuildEmptyTree() {
    // Have an empty configuration.
    ConfigTree tree = ConfigTreeUtils.makeTree("<cruisecontrol />");
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    assertEquals("cruisecontrol", root.getName());
    assertTrue(root.getHtmlDocumentation().length() > 50);
   
    // The tree should be empty.
    assertTrue(root.isLeaf());
   
    // Try to expand the node.
    tree.expandPath(new TreePath(root.getPath()));
    assertTrue(root.isLeaf());
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.gui.configuration.tree.nodes.RootNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.