Package org.objectstyle.woproject.ant

Source Code of org.objectstyle.woproject.ant.WOUnit

package org.objectstyle.woproject.ant;

import java.util.LinkedList;
import java.util.List;

import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.taskdefs.optional.junit.JUnitTask;
import org.objectstyle.woenvironment.env.WOEnvironment;

public class WOUnit extends JUnitTask {
  private List<FrameworkSet> frameworkSets;

  public WOUnit() throws Exception {
    frameworkSets = new LinkedList<FrameworkSet>();
  }

  public void addFrameworks(FrameworkSet frameworks) throws BuildException {
    frameworkSets.add(frameworks);
  }

  @Override
  public void execute() throws BuildException {
    getCommandline().createClasspath(getProject()).createPath().add(FrameworkSet.jarsPathForFrameworkSets(getProject(), frameworkSets, new WOEnvironment(getProject().getProperties()).getWOVariables()));
    super.execute();
  }
}
TOP

Related Classes of org.objectstyle.woproject.ant.WOUnit

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.