Examples of WttConfig


Examples of com.agiletec.plugins.jpwtt.aps.system.services.ticket.model.WttConfig

   * @param xml The xml containing the configuration.
   * @return The wtt configuration.
   * @throws ApsSystemException In case of parsing errors.
   */
  public WttConfig extractConfig(String xml) throws ApsSystemException {
    WttConfig config = new WttConfig();
    Element root = this.getRootElement(xml);
    this.extractConfig(root, config);
    return config;
  }
View Full Code Here

Examples of com.agiletec.plugins.jpwtt.aps.system.services.ticket.model.WttConfig

        this.init();
    }

    public void testReadConfig() throws Throwable {
      String xml = this._configManager.getConfigItem("jpwttConfig");
      WttConfig config = new WttConfigDOM().extractConfig(xml);

      assertEquals(2, config.getInterventionTypes().size());
      InterventionType hwType = config.getInterventionType(new Integer(1));
      assertEquals("Hardware", hwType.getDescr());
      assertEquals(new Integer(1), hwType.getId());
      InterventionType swType = config.getInterventionType(new Integer(2));
      assertEquals("Software", swType.getDescr());
      assertEquals(new Integer(2), swType.getId());

      Map<Integer, String> priorities = config.getPriorities();
      assertEquals(3, priorities.size());
      assertEquals("High", priorities.get(new Integer(1)));
      assertEquals("Medium", priorities.get(new Integer(2)));
      assertEquals("Low", priorities.get(new Integer(3)));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.