/** * Interface for test. * * @param projectName name of the project * @param action action object, which can be construct to complete some test work * @return the meta info of the target project */ public ProjectMeta test(String projectName, Action action) { RootProcess rootProcess = rootProcessMap.get(projectName); ProjectMeta projectMeta = projectMetaMap.get(projectName); rootProcess.doSupervisedAction(action, new ArrayList<String>()); return projectMeta; }
private RootProcess initProject(ProjectMeta projectMeta) { projectMetaMap.put(projectMeta.getProjectName(), projectMeta); RootProcess rootProcess = new RootProcess(projectMeta); rootProcess.init(); rootProcessMap.put(projectMeta.getProjectName(), rootProcess); console.addProject(projectMeta.getProjectName()); console.addPackage(projectMeta.getTopoOrderPackageList()); return rootProcess; }
/** * Do a single specific action. * * @param actionName name of the action * @param projectMeta project meta * @param rootProcess root process of the project * @param packages target packages */ public void doSingleAction( String actionName, ProjectMeta projectMeta, RootProcess rootProcess, List<String> packages) { // construct action from factory Action actionObj = actionFactory.createAction(actionName, projectMeta); rootProcess.doSupervisedAction(actionObj, packages); }