public static synchronized void loadPropertyLists(
      TestConfig testConfig,
      Locale lc,
      List attributeKeys,
      List attributeHelps,
      List attributeValues) {
    if (!lc.equals(Locale.getDefault())) {
      Locale.setDefault(lc);
      Introspector.flushCaches();
    }

    PropertyDescriptor[] pd = testConfig.getPropertyDescriptors();

    for (int i = 0; i < pd.length; i++) {
      PropertyDescriptor property = pd[i];
      String propertyName = property.getName();
      String displayName = ArgumentConfig.getDisplayName(property);
      String description = ArgumentConfig.getDescription(property);

      attributeKeys.add(propertyName);
      attributeHelps.add(description);
      attributeValues.add(testConfig.getArgStringValue(propertyName));
    }
  }
예제 #2
0
  /**
   * TestConfig constructor.
   *
   * <p>Creates a copy from the TestConfig specified.
   *
   * @param t the data to copy
   */
  public TestConfig(TestConfig t) {
    name = t.getName();
    description = t.getDescription();
    plugIn = new PlugInConfig(t.getPlugIn());
    args = new HashMap();

    if (t.getArgs() != null) {
      Iterator i = t.getArgs().keySet().iterator();

      while (i.hasNext()) {
        String key = (String) i.next();

        // TODO clone value.
        args.put(key, new ArgumentConfig((ArgumentConfig) t.getArgs().get(key)));
      }
    }
  }