Skip to content

Commit 676ac3e

Browse files
cleanup
1 parent a2a4137 commit 676ac3e

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

cobigen/cobigen-core/src/test/java/com/devonfw/cobigen/unittest/CobiGenFactoryTest.java

+7-14
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,6 @@
2222
*/
2323
public class CobiGenFactoryTest {
2424

25-
/**
26-
* Root path to all resources used in this test case
27-
*/
28-
private final static Path TEST_FILE_ROOT_PATH_DOWNLOADED = Paths.get(
29-
"src/test/resources/testdata/unittest/config/reader/TemplateSetConfigurationReaderTest/valid_template_sets_downloaded/template-sets");
30-
31-
/**
32-
* Root path to resources used in this test case
33-
*/
34-
private final static Path TEST_FILE_ROOT_PATH_ADAPTED = Paths.get(
35-
"src/test/resources/testdata/unittest/config/reader/TemplateSetConfigurationReaderTest/valid_template_sets_adapted/template-sets");
36-
3725
/**
3826
* JUnit Rule to temporarily create files and folders, which will be automatically removed after test execution
3927
*/
@@ -49,8 +37,11 @@ public class CobiGenFactoryTest {
4937
@Test
5038
public void testTemplateSetDownloadedLoadedFromNewConfiguration() throws Exception {
5139

40+
Path downloadedPath = Paths.get(
41+
"src/test/resources/testdata/unittest/config/reader/TemplateSetConfigurationReaderTest/valid_template_sets_downloaded/template-sets");
42+
5243
File folder = this.tmpFolder.newFolder("TemplateSetsInstalledTest");
53-
FileUtils.copyDirectory(TEST_FILE_ROOT_PATH_DOWNLOADED.getParent().toFile(), folder);
44+
FileUtils.copyDirectory(downloadedPath.getParent().toFile(), folder);
5445
withEnvironmentVariable(ConfigurationConstants.CONFIG_ENV_HOME, folder.getAbsolutePath()).execute(() -> {
5546
CobiGenFactory.create(folder.toPath().resolve("template-sets").toUri(), false);
5647
});
@@ -65,8 +56,10 @@ public void testTemplateSetDownloadedLoadedFromNewConfiguration() throws Excepti
6556
@Test
6657
public void testTemplateSetAdaptedLoadedFromNewConfiguration() throws Exception {
6758

59+
Path adaptedPath = Paths.get(
60+
"src/test/resources/testdata/unittest/config/reader/TemplateSetConfigurationReaderTest/valid_template_sets_adapted/template-sets");
6861
File folder = this.tmpFolder.newFolder("TemplateSetsInstalledTest");
69-
FileUtils.copyDirectory(TEST_FILE_ROOT_PATH_ADAPTED.getParent().toFile(), folder);
62+
FileUtils.copyDirectory(adaptedPath.getParent().toFile(), folder);
7063
withEnvironmentVariable(ConfigurationConstants.CONFIG_ENV_HOME, folder.getAbsolutePath()).execute(() -> {
7164
CobiGenFactory.create(folder.toPath().resolve("template-sets").toUri(), false);
7265
});

0 commit comments

Comments
 (0)