use of eu.stamp_project.dspot.common.configuration.UserInput in project dspot by STAMP-project.
the class GradleInjectorTest method testOnGradleFromActiveonWithoutBuildscript.
@Test
public void testOnGradleFromActiveonWithoutBuildscript() {
/*
test the injection of what we need in the build.gradle when we removed the
buildscript {
...
}
*/
UserInput configuration = new UserInput();
configuration.setExcludedClasses("fr.inria.filter.failing.*");
configuration.setJVMArgs("-Xmx2048m,-Xms1024m");
configuration.setFilter("fr.inria.sample.*");
final GradleInjector gradleInjector = new GradleInjector("src/test/resources/no_buildscript_build.gradle", !configuration.isGregorMode(), configuration.getFilter(), configuration.getPitVersion(), configuration.getTimeOutInMs(), configuration.getJVMArgs(), configuration.getExcludedClasses(), configuration.getAdditionalClasspathElements());
final String pitTask = gradleInjector.getPitTask();
assertTrue(pitTask, pitTask.endsWith(expectedEnd));
}
use of eu.stamp_project.dspot.common.configuration.UserInput in project dspot by STAMP-project.
the class GradleInjectorTest method testOnGradleFromActiveon.
@Test
public void testOnGradleFromActiveon() {
/*
test the injection of what we need in the build.gradle
*/
UserInput configuration = new UserInput();
configuration.setAbsolutePathToProjectRoot("src/test/resources/");
configuration.setExcludedClasses("fr.inria.filter.failing.*");
configuration.setJVMArgs("-Xmx2048m,-Xms1024m");
configuration.setFilter("fr.inria.sample.*");
final GradleInjector gradleInjector = new GradleInjector("src/test/resources/build.gradle", !configuration.isGregorMode(), configuration.getFilter(), configuration.getPitVersion(), configuration.getTimeOutInMs(), configuration.getJVMArgs(), configuration.getExcludedClasses(), configuration.getAdditionalClasspathElements());
final String pitTask = gradleInjector.getPitTask();
assertTrue(pitTask, pitTask.startsWith(expectedStarts));
assertTrue(pitTask, pitTask.endsWith(expectedEnd));
}
use of eu.stamp_project.dspot.common.configuration.UserInput in project dspot by STAMP-project.
the class GradleInjectorTest method testOnGradleFromActiveonWithoutRepositories.
@Test
public void testOnGradleFromActiveonWithoutRepositories() {
/*
test the injection of what we need in the build.gradle when we removed the
buildscript {
...
}
*/
UserInput configuration = new UserInput();
configuration.setExcludedClasses("fr.inria.filter.failing.*");
configuration.setJVMArgs("-Xmx2048m,-Xms1024m");
configuration.setFilter("fr.inria.sample.*");
final GradleInjector gradleInjector = new GradleInjector("src/test/resources/no_repositories_build.gradle", !configuration.isGregorMode(), configuration.getFilter(), configuration.getPitVersion(), configuration.getTimeOutInMs(), configuration.getJVMArgs(), configuration.getExcludedClasses(), configuration.getAdditionalClasspathElements());
final String pitTask = gradleInjector.getPitTask();
assertTrue(pitTask, pitTask.startsWith(expectedStarts));
assertTrue(pitTask, pitTask.endsWith(expectedEnd));
}
use of eu.stamp_project.dspot.common.configuration.UserInput in project dspot by STAMP-project.
the class TestFrameworkTest method setUp.
@Before
@Override
public void setUp() {
super.setUp();
UserInput configuration = new UserInput();
configuration.setAbsolutePathToProjectRoot(new File("src/test/resources/sample/").getAbsolutePath());
DSpotUtils.init(CommentEnum.Amplifier, "target/dspot/", configuration.getFullClassPathWithExtraDependencies(), "src/test/resources/sample/");
}
use of eu.stamp_project.dspot.common.configuration.UserInput in project dspot by STAMP-project.
the class AbstractSelectorTest method setUp.
@Before
public void setUp() throws Exception {
DSpotState.verbose = true;
this.configuration = new UserInput();
this.configuration.setAbsolutePathToProjectRoot(getPathToAbsoluteProjectRoot());
this.configuration.setOutputDirectory(outputDirectory);
this.configuration.setGregorMode(true);
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.getPathToAbsoluteProjectRoot());
this.compiler = DSpotCompiler.createDSpotCompiler(configuration, dependencies);
DSpotCache.init(10000);
Launcher launcher = new Launcher();
launcher.getEnvironment().setNoClasspath(true);
launcher.addInputResource(this.getPathToAbsoluteProjectRoot());
launcher.buildModel();
this.factory = launcher.getFactory();
TestFramework.init(this.factory);
this.testRunner = new TestRunner(this.getPathToAbsoluteProjectRoot(), "", false);
this.testCompiler = new TestCompiler(0, false, this.getPathToAbsoluteProjectRoot(), this.configuration.getClasspathClassesProject(), 10000, "", false);
AssertionGeneratorUtils.init(false);
DSpotPOMCreator.createNewPom(configuration);
RandomHelper.setSeedRandom(72L);
ValueCreator.count = 0;
this.testSelectorUnderTest = this.getTestSelector();
}
Aggregations