All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.dagere.peass.dependencyprocessors.PairProcessor Maven / Gradle / Ivy

The newest version!
package de.dagere.peass.dependencyprocessors;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

import de.dagere.nodeDiffDetector.data.TestCase;
import de.dagere.nodeDiffDetector.data.TestMethodCall;
import de.dagere.peass.dependency.persistence.InitialCallList;
import de.dagere.peass.dependency.persistence.InitialCommit;
import de.dagere.peass.dependency.persistence.StaticTestSelection;

/**
 * Base for processing pair of potentially changed testcases, which are given by a static selection file or execution file.
 * 
 * @author reichelt
 *
 */
public abstract class PairProcessor extends CommitProcessor {

   protected final Map lastTestcaseCalls = new HashMap<>();

   public PairProcessor(final File projectFolder, final StaticTestSelection dependencies) {
      super(projectFolder, dependencies);
   }

   public PairProcessor() {
   }

   @Override
   public void processInitialCommit(final InitialCommit commitinfo) {
      for (final Map.Entry initDependency : commitinfo.getInitialDependencies().entrySet()) {
         final TestCase testcase = initDependency.getKey();
         lastTestcaseCalls.put(testcase, commitinfo.getCommit());
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy