Search in sources :

Example 1 with JacocoCoverageSelector

use of eu.stamp_project.dspot.selector.JacocoCoverageSelector in project dspot by STAMP-project.

the class ProjectJSONTest method setUp.

@Before
public void setUp() {
    super.setUp();
    this.configuration = new UserInput();
    this.configuration.setAbsolutePathToProjectRoot(getPathToProjectRoot());
    this.configuration.setOutputDirectory(outputDirectory);
    this.builder = AutomaticBuilderEnum.Maven.getAutomaticBuilder(configuration);
    this.initializeDSpot = new InitializeDSpot();
    String dependencies = initializeDSpot.completeDependencies(configuration, this.builder);
    DSpotUtils.init(CommentEnum.None, outputDirectory, this.configuration.getFullClassPathWithExtraDependencies(), this.getPathToProjectRoot());
    this.compiler = DSpotCompiler.createDSpotCompiler(configuration, dependencies);
    DSpotCache.init(10000);
    Launcher launcher = new Launcher();
    launcher.getEnvironment().setNoClasspath(true);
    launcher.addInputResource(this.getPathToProjectRoot());
    launcher.buildModel();
    this.factory = launcher.getFactory();
    TestFramework.init(this.factory);
    testCompiler = new TestCompiler(0, false, this.getPathToProjectRoot(), this.configuration.getClasspathClassesProject(), 10000, "", false);
    AssertionGeneratorUtils.init(false);
    DSpotPOMCreator.createNewPom(configuration);
    RandomHelper.setSeedRandom(72L);
    ValueCreator.count = 0;
    this.testSelector = new JacocoCoverageSelector(builder, configuration);
    try {
        FileUtils.forceDelete(new File(outputDirectory));
    } catch (Exception ignored) {
    }
}
Also used : TestCompiler(eu.stamp_project.dspot.common.compilation.TestCompiler) JacocoCoverageSelector(eu.stamp_project.dspot.selector.JacocoCoverageSelector) UserInput(eu.stamp_project.dspot.common.configuration.UserInput) Launcher(spoon.Launcher) InitializeDSpot(eu.stamp_project.dspot.common.configuration.InitializeDSpot) Before(org.junit.Before)

Aggregations

TestCompiler (eu.stamp_project.dspot.common.compilation.TestCompiler)1 InitializeDSpot (eu.stamp_project.dspot.common.configuration.InitializeDSpot)1 UserInput (eu.stamp_project.dspot.common.configuration.UserInput)1 JacocoCoverageSelector (eu.stamp_project.dspot.selector.JacocoCoverageSelector)1 Before (org.junit.Before)1 Launcher (spoon.Launcher)1