-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
Description
Check:
Lines 115 to 142 in 5af0844
| /** | |
| * Test of adapt templates with old CobiGen_Templates project existing | |
| * | |
| * @throws IOException if an Exception occurs | |
| */ | |
| @Test | |
| public void adaptTemplatesWithOldConfiguration() throws IOException { | |
| String testFileRootPathMonolithicTemplates = apiTestsRootPath + "AdaptMonolithicTemplatesTest/"; | |
| Path cobiGenHomeMonolithicTemplates = this.tempFolder.newFolder("playground", "templatesMonolithicHome").toPath(); | |
| FileUtils.copyDirectory(new File(testFileRootPathMonolithicTemplates), cobiGenHomeMonolithicTemplates.toFile()); | |
| Path cobigenTemplatesParent = cobiGenHomeMonolithicTemplates | |
| .resolve(ConfigurationConstants.CONFIG_PROPERTY_TEMPLATES_PATH); | |
| Path cobigenTemplatesProject = cobigenTemplatesParent.resolve(ConfigurationConstants.COBIGEN_TEMPLATES); | |
| TemplateAdapter templateAdapter = new TemplateAdapterImpl(cobigenTemplatesParent); | |
| assertThrows(UpgradeTemplatesNotificationException.class, () -> { | |
| templateAdapter.adaptTemplates(); | |
| }); | |
| assertThat(cobigenTemplatesProject).exists().isDirectory(); | |
| assertThat(cobigenTemplatesProject.resolve(ConfigurationConstants.TEMPLATE_RESOURCE_FOLDER)).exists().isDirectory(); | |
| assertThat(cobigenTemplatesProject.resolve("src/main/java")).exists().isDirectory(); | |
| } | |
| } |
Make sure that binaries used in this test get replaced with a test project.