Exemplo n.º 1
0
  /**
   * Transforms the Collection of Specifications into a Vector of Specification parameters.
   *
   * @param specifications
   * @return the Collection of Specifications into a Vector of Specification parameters
   */
  public static Vector<Object> toXmlRpcSpecificationsParameters(
      Collection<Specification> specifications) {
    Vector<Object> specificationsParams = new Vector<Object>();
    for (Specification specification : specifications) {
      specificationsParams.add(specification.marshallize());
    }

    return specificationsParams;
  }
Exemplo n.º 2
0
  /**
   * Transforms the Vector of the Specification parameters into a Specification Object.<br>
   * Structure of the parameters:<br>
   * Vector[name, Vector[repository parameters], Vector[SUT parameters]]
   *
   * @param Specification
   * @return the Specification.
   */
  @SuppressWarnings("unchecked")
  public static Specification toSpecification(Vector<Object> xmlRpcParameters) {
    Specification specification = null;
    if (!xmlRpcParameters.isEmpty()) {
      specification = Specification.newInstance((String) xmlRpcParameters.get(DOCUMENT_NAME_IDX));
      specification.setRepository(
          toRepository((Vector<Object>) xmlRpcParameters.get(DOCUMENT_REPOSITORY_IDX)));
      specification.setTargetedSystemUnderTests(
          toSystemUnderTestList((Vector<Object>) xmlRpcParameters.get(SPECIFICATION_SUTS_IDX)));
    }

    return specification;
  }