use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestPropertyReadHelper method testNullVersion.
@Test
public void testNullVersion() throws IOException {
Change changeMock = Mockito.mock(Change.class);
Mockito.when(changeMock.getMethod()).thenReturn("myTestMethod");
ExecutionConfig config = new ExecutionConfig();
config.setVersion("000001");
File projectFolder = new File("target/current");
Files.touch(new File(projectFolder, "pom.xml"));
PropertyReadHelper helper = new PropertyReadHelper(config, new ChangedEntity("Test"), changeMock, projectFolder, null, null, null);
ChangeProperty emptyProperty = helper.read();
MatcherAssert.assertThat(emptyProperty, IsNull.notNullValue());
Assert.assertEquals("myTestMethod", emptyProperty.getMethod());
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestKiekerEnvironmentPreparer method testAOPXMLGeneration.
@Test
public void testAOPXMLGeneration() throws IOException, InterruptedException {
Set<String> includedMethodPatterns = new HashSet<String>();
includedMethodPatterns.add("public void defaultpackage.NormalDependency.methodA(java.lang.String,int)");
includedMethodPatterns.add("private int defaultpackage.NormalDependency.methodB()");
List<File> modules = new LinkedList<File>();
modules.add(DependencyTestConstants.CURRENT);
KiekerConfig kiekerConfig = new KiekerConfig(true);
kiekerConfig.setUseSourceInstrumentation(false);
KiekerEnvironmentPreparer kiekerEnvironmentPreparer = new KiekerEnvironmentPreparer(includedMethodPatterns, new LinkedList<>(), new PeassFolders(DependencyTestConstants.CURRENT), new JUnitTestTransformer(DependencyTestConstants.CURRENT, new ExecutionConfig(10), kiekerConfig), modules);
kiekerEnvironmentPreparer.prepareKieker();
checkAopCorrectness();
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestExecutor method loadClasses.
public void loadClasses() {
existingClasses = new LinkedList<>();
for (final File module : getModules().getModules()) {
ExecutionConfig executionConfig = testTransformer.getConfig().getExecutionConfig();
ClazzFileFinder finder = new ClazzFileFinder(executionConfig);
final List<String> currentClasses = finder.getClasses(module);
existingClasses.addAll(currentClasses);
}
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestGetModules method testOtherSimple.
@Test
public void testOtherSimple() {
File pomFile = new File("src/test/resources/maven-multimodule-pl-example/basic_state/pom.xml");
ExecutionConfig config = new ExecutionConfig();
ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
Assert.assertEquals(4, modules.getModules().size());
}
use of de.dagere.peass.config.ExecutionConfig in project peass by DaGeRe.
the class TestGetModules method testWrongPl.
@Test
public void testWrongPl() {
Assertions.assertThrows(RuntimeException.class, () -> {
File pomFile = new File("src/test/resources/maven-multimodule-pl-example/basic_state/pom.xml");
ExecutionConfig config = new ExecutionConfig();
config.setPl("inner-module-1");
ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
});
}
Aggregations