Search in sources :

Example 16 with ProjectModules

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

the class TestBuildGradle method testNoUpdate.

@Test
public void testNoUpdate() throws IOException {
    final File gradleFile = new File(GRADLE_BUILDFILE_FOLDER, "differentPlugin.gradle");
    final File destFile = copyGradlefile(gradleFile);
    GradleBuildfileEditor editor = new GradleBuildfileEditor(mockedTransformer, destFile, new ProjectModules(CURRENT));
    editor.addDependencies(new File("xyz"));
    Assert.assertTrue(FileUtils.contentEquals(gradleFile, destFile));
}
Also used : ProjectModules(de.dagere.peass.execution.utils.ProjectModules) GradleBuildfileEditor(de.dagere.peass.execution.gradle.GradleBuildfileEditor) File(java.io.File) Test(org.junit.jupiter.api.Test)

Example 17 with ProjectModules

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

the class TestChangedNames method testSuffix.

@Test
public void testSuffix() throws IOException {
    File settingsFile = new File(TestConstants.TEST_RESOURCES, "gradle/settings_with_changed_suffix.gradle");
    File goalFile = new File(TestConstants.CURRENT_FOLDER, "settings.gradle");
    FileUtils.copyFile(settingsFile, goalFile);
    createModuleFoldersSuffix();
    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 18 with ProjectModules

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

the class TestChangedNames method testPrefix.

@Test
public void testPrefix() throws IOException {
    File settingsFile = new File(TestConstants.TEST_RESOURCES, "gradle/settings_with_changed_prefix.gradle");
    File goalFile = new File(TestConstants.CURRENT_FOLDER, "settings.gradle");
    FileUtils.copyFile(settingsFile, goalFile);
    createModuleFoldersPrefix();
    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 19 with ProjectModules

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

the class TestGetModules method testOtherPl1.

@Test
public void testOtherPl1() {
    File pomFile = new File("src/test/resources/maven-multimodule-pl-example/basic_state/pom.xml");
    ExecutionConfig config = new ExecutionConfig();
    config.setPl("de.peass:inner-module-1");
    ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
    Assert.assertEquals(2, 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 20 with ProjectModules

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

the class TestGetModules method testOtherPl2.

@Test
public void testOtherPl2() {
    File pomFile = new File("src/test/resources/maven-multimodule-pl-example/basic_state/pom.xml");
    ExecutionConfig config = new ExecutionConfig();
    config.setPl("de.peass:inner-module-test2");
    ProjectModules modules = MavenPomUtil.getModules(pomFile, config);
    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