22
22
*/
23
23
public class CobiGenFactoryTest {
24
24
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
-
37
25
/**
38
26
* JUnit Rule to temporarily create files and folders, which will be automatically removed after test execution
39
27
*/
@@ -49,8 +37,11 @@ public class CobiGenFactoryTest {
49
37
@ Test
50
38
public void testTemplateSetDownloadedLoadedFromNewConfiguration () throws Exception {
51
39
40
+ Path downloadedPath = Paths .get (
41
+ "src/test/resources/testdata/unittest/config/reader/TemplateSetConfigurationReaderTest/valid_template_sets_downloaded/template-sets" );
42
+
52
43
File folder = this .tmpFolder .newFolder ("TemplateSetsInstalledTest" );
53
- FileUtils .copyDirectory (TEST_FILE_ROOT_PATH_DOWNLOADED .getParent ().toFile (), folder );
44
+ FileUtils .copyDirectory (downloadedPath .getParent ().toFile (), folder );
54
45
withEnvironmentVariable (ConfigurationConstants .CONFIG_ENV_HOME , folder .getAbsolutePath ()).execute (() -> {
55
46
CobiGenFactory .create (folder .toPath ().resolve ("template-sets" ).toUri (), false );
56
47
});
@@ -65,8 +56,10 @@ public void testTemplateSetDownloadedLoadedFromNewConfiguration() throws Excepti
65
56
@ Test
66
57
public void testTemplateSetAdaptedLoadedFromNewConfiguration () throws Exception {
67
58
59
+ Path adaptedPath = Paths .get (
60
+ "src/test/resources/testdata/unittest/config/reader/TemplateSetConfigurationReaderTest/valid_template_sets_adapted/template-sets" );
68
61
File folder = this .tmpFolder .newFolder ("TemplateSetsInstalledTest" );
69
- FileUtils .copyDirectory (TEST_FILE_ROOT_PATH_ADAPTED .getParent ().toFile (), folder );
62
+ FileUtils .copyDirectory (adaptedPath .getParent ().toFile (), folder );
70
63
withEnvironmentVariable (ConfigurationConstants .CONFIG_ENV_HOME , folder .getAbsolutePath ()).execute (() -> {
71
64
CobiGenFactory .create (folder .toPath ().resolve ("template-sets" ).toUri (), false );
72
65
});
0 commit comments