Package net.sourceforge.cruisecontrol.gendoc

Examples of net.sourceforge.cruisecontrol.gendoc.AttributeInfo


    Collection<AttributeInfo> attributes = info.getAttributes();
    Iterator<AttributeInfo> it = attributes.iterator();
    for (int i = 0; i < components.length; i++) {
      JPanel attribPanel = (JPanel)components[i];
      JLabel label = (JLabel) attribPanel.getComponent(0);
      AttributeInfo attribInfo = it.next();
     
      String expected = attribInfo.getTitle();
      if (attribInfo.getMinCardinality() > 0) {
        expected = "<html>" + expected + "<font color=\"red\">*</font></html>";
      }
      Assert.assertEquals(expected, label.getText());
     
      expected = testNode.getAttributeValue(attribInfo.getName());
      if (expected == null) {
        expected = new String();
      }
      Assert.assertEquals(
          expected,
View Full Code Here


    Iterator<AttributeInfo> attrs = testNode.getPluginInfo().getAttributes().iterator();
    for (int i = 0; i < 5; i++) {
      JComponent attrEd = (JComponent) attributePane.getComponent(i);
      JLabel label = (JLabel) attrEd.getComponent(0);
     
      AttributeInfo attr = attrs.next();
      String name = attr.getName();
     
      if (name.equals("name")) {
        // This attribute is required, so it has a red star.
        assertEquals("<html>name<font color=\"red\">*</font></html>",
            label.getText());
      } else {
        assertEquals(attr.getName(), label.getText());
      }
     
      JTextField textField = (JTextField) attrEd.getComponent(1);
      if (name.equals("name")) {
        assertEquals("Proj", textField.getText());
View Full Code Here

    PluginInfo proj1Info = new PluginInfo(null, "cruisecontrol", "", "", noAttrs, new ChildInfo[] {
        new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
          new PluginInfo(null, "project", "", "", noAttrs, new ChildInfo[] {
            new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
              schedule1Info = new PluginInfo(null, "schedule", "proj1 version of schedule", "", new AttributeInfo[] {
                new AttributeInfo("interval", AttributeType.NUMBER, "", "", "", new int[] {0, 1}, "")
              }, noChildren)
            })})})});
    PluginInfo proj2Info = new PluginInfo(null, "cruisecontrol", "", "", noAttrs, new ChildInfo[] {
        new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
          new PluginInfo(null, "project", "", "", noAttrs, new ChildInfo[] {
            new ChildInfo("", "", 0, -1, "", new PluginInfo[] {
              schedule2Info = new PluginInfo(null, "schedule", "proj2 version of schedule", "", new AttributeInfo[] {
                new AttributeInfo("interval", AttributeType.NUMBER, "", "", "", new int[] {0, 1}, "")
              }, noChildren)
            })})})});
   
    // Build a custom MockServer.
    String xml =
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.gendoc.AttributeInfo

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.