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

Examples of net.sourceforge.cruisecontrol.gui.configuration.tree.ConfigTree


    assertEquals("100", schedule1.getAttributeValue("interval"));
    assertEquals("200", schedule2.getAttributeValue("interval"));
  }
 
  public void testPluginPlugin() {
    ConfigTree tree = ConfigTreeUtils.makeTree(
        "<cruisecontrol>" +
        "<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()));
    assertEquals(1, project.getChildCount());
    PluginPluginNode pluginC = (PluginPluginNode) project.getChildAt(0);
   
    assertEquals("c", pluginC.getAttributeValue("name"));
    assertEquals("d", pluginC.getAttributeValue("classname"));
View Full Code Here


    assertEquals("d", pluginC.getAttributeValue("classname"));
  }
 
  public void testCustomPlugins() {
    // Ensure that <plugin> tags can have children defined by their target plugins.
    ConfigTree tree = ConfigTreeUtils.makeTree(
        "<cruisecontrol>" +
        "<plugin name='modificationset' classname='" + ModificationSet.class.getName() + "'>" +
        "  <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);
View Full Code Here

    assertEquals("git", git.getName());
    assertTrue(git.isLeaf());
  }
 
  public void testChildIterator() {
    ConfigTree tree = ConfigTreeUtils.makeTree(
        "<cruisecontrol>" +
        "<project name='Proj1'><schedule /></project>" +
        "<project name='Proj2'><modificationset>" +
        "  <svn />" +
        "</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());
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.gui.configuration.tree.ConfigTree

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.