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

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


        "</cruisecontrol>",
        "Proj1",
        "Proj2");
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
    ProjectNode proj = (ProjectNode) root.getChildAt(0);
    this.testNode = (BasicNode) proj.getChildAt(0);
  }
View Full Code Here


  public void testScheduleElements() {
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
           
    assertFalse(proj1.isLeaf());
    assertEquals(6, proj1.getChildCount());
   
    BasicNode schedule = (BasicNode) proj1.getChildAt(0);
    assertEquals("schedule", schedule.getName());
   
    al.buildMenu(schedule);
    JPopupMenu menu = al.getPopup();
 
View Full Code Here

 
  public void testListenerElement() {
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
           
    assertFalse(proj1.isLeaf());
    assertEquals(6, proj1.getChildCount());
   
    BasicNode listeners = (BasicNode) proj1.getChildAt(1);
    assertEquals("listeners", listeners.getName());
   
    al.buildMenu(listeners);
    JPopupMenu menu = al.getPopup();
 
View Full Code Here

  public void testBootstrapperElement() {
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
           
    assertFalse(proj1.isLeaf());
    assertEquals(6, proj1.getChildCount());
   
    BasicNode bootstrapper = (BasicNode) proj1.getChildAt(2);
    assertEquals("bootstrappers", bootstrapper.getName());
   
    al.buildMenu(bootstrapper);
    JPopupMenu menu = al.getPopup();
 
View Full Code Here

  public void testModificationSetElement() {
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
           
    assertFalse(proj1.isLeaf());
    assertEquals(6, proj1.getChildCount());
   
    BasicNode modificationset = (BasicNode) proj1.getChildAt(3);
    assertEquals("modificationset", modificationset.getName());
   
    al.buildMenu(modificationset);
    JPopupMenu menu = al.getPopup();
 
View Full Code Here

  public void testLogElement() {
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
           
    assertFalse(proj1.isLeaf());
    assertEquals(6, proj1.getChildCount());
   
    BasicNode log = (BasicNode) proj1.getChildAt(4);
    assertEquals("log", log.getName());
   
    al.buildMenu(log);
    JPopupMenu menu = al.getPopup();
 
View Full Code Here

  public void testPublishersElement() {
    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
           
    assertFalse(proj1.isLeaf());
    assertEquals(6, proj1.getChildCount());
   
    BasicNode publishers = (BasicNode) proj1.getChildAt(5);
    assertEquals("publishers", publishers.getName());
   
    al.buildMenu(publishers);
    JPopupMenu menu = al.getPopup();
 
View Full Code Here

    TreeModel model = tree.getModel();
    RootNode root = (RootNode) model.getRoot();
   
    // Check for 2 project nodes.
    assertEquals(2, root.getChildCount());
    ProjectNode proj1 = (ProjectNode) root.getChildAt(0);
    ProjectNode proj2 = (ProjectNode) root.getChildAt(1);
   
    assertEquals("Proj1", proj1.getName());
    assertEquals("Proj1", proj1.getAttributeValue("name"));
   
    assertEquals("Proj2", proj2.getName());
    assertEquals("Proj2", proj2.getAttributeValue("name"));
   
    assertFalse(proj1.isLeaf());
    assertEquals(1, proj1.getChildCount());
   
    BasicNode schedule = (BasicNode) proj1.getChildAt(0);
    assertTrue(schedule.isLeaf());
    assertEquals("schedule", schedule.getName());
   
    assertFalse(proj2.isLeaf());
    assertEquals(1, proj2.getChildCount());
   
    BasicNode modificationset = (BasicNode) proj2.getChildAt(0);
    assertEquals("modificationset", modificationset.getName());
    assertEquals(1, modificationset.getChildCount());
   
    BasicNode svn = (BasicNode) modificationset.getChildAt(0);
    assertEquals("svn", svn.getName());
View Full Code Here

    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()));
    assertEquals(1, proj2.getChildCount());
   
    BasicNode schedule1 = (BasicNode) proj1.getChildAt(0);
    BasicNode schedule2 = (BasicNode) proj2.getChildAt(0);
   
    assertSame(schedule1Info, schedule1.getPluginInfo());
    assertSame(schedule2Info, schedule2.getPluginInfo());
   
    assertEquals("100", schedule1.getAttributeValue("interval"));
View Full Code Here

    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

TOP

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

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.