Search in sources :

Example 1 with ProjectModules

use of de.dagere.peass.execution.utils.ProjectModules in project peass by DaGeRe.

the class TestChangedNames method testBoth.

@Test
public void testBoth() throws IOException {
    File settingsFile = new File(TestConstants.TEST_RESOURCES, "gradle/settings_with_changed_both.gradle");
    File goalFile = new File(TestConstants.CURRENT_FOLDER, "settings.gradle");
    FileUtils.copyFile(settingsFile, goalFile);
    createModuleFoldersBoth();
    ProjectModules modules = SettingsFileParser.getModules(TestConstants.CURRENT_FOLDER);
    Assert.assertEquals(3, modules.getModules().size());
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 2 with ProjectModules

use of de.dagere.peass.execution.utils.ProjectModules 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());
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 3 with ProjectModules

use of de.dagere.peass.execution.utils.ProjectModules 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);
    });
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 4 with ProjectModules

use of de.dagere.peass.execution.utils.ProjectModules in project peass by DaGeRe.

the class TestGetModules method testOtherPlUsing.

@Test
public void testOtherPlUsing() {
    File pomFile = new File("src/test/resources/maven-multimodule-pl-example/basic_state/pom.xml");
    ExecutionConfig config = new ExecutionConfig();
    config.setPl("using-module");
    ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
    Assert.assertEquals(4, modules.getModules().size());
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 5 with ProjectModules

use of de.dagere.peass.execution.utils.ProjectModules in project peass by DaGeRe.

the class TestGetModules method testPeassItself.

@Test
public void testPeassItself() {
    File pomFile = new File("../pom.xml");
    ProjectModules modules = MavenPomUtil.getModules(pomFile, new ExecutionConfig());
    Assert.assertEquals(3, modules.getModules().size());
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) ExecutionConfig(de.dagere.peass.config.ExecutionConfig) File(java.io.File) Test(org.junit.jupiter.api.Test)

Aggregations

ProjectModules (de.dagere.peass.execution.utils.ProjectModules)21 File (java.io.File)19 Test (org.junit.jupiter.api.Test)14 ExecutionConfig (de.dagere.peass.config.ExecutionConfig)12 ModuleClassMapping (de.dagere.peass.dependency.analysis.ModuleClassMapping)5 TestCase (de.dagere.peass.dependency.analysis.data.TestCase)4 TestSet (de.dagere.peass.dependency.analysis.data.TestSet)3 JmhTestTransformer (de.dagere.peass.dependency.jmh.JmhTestTransformer)3 GradleBuildfileEditor (de.dagere.peass.execution.gradle.GradleBuildfileEditor)2 IOException (java.io.IOException)2 LinkedList (java.util.LinkedList)2 ProjectChanges (de.dagere.peass.analysis.changes.ProjectChanges)1 StatisticsConfig (de.dagere.peass.config.StatisticsConfig)1 OneTraceGenerator (de.dagere.peass.dependency.traces.OneTraceGenerator)1 ProcessSuccessTester (de.dagere.peass.execution.processutils.ProcessSuccessTester)1 GitCommit (de.dagere.peass.vcs.GitCommit)1 XmlPullParserException (org.codehaus.plexus.util.xml.pull.XmlPullParserException)1 Test (org.junit.Test)1