-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Expected behavior
As a CobiGen user, I want to have two different versions of a template set in my adapted folder but only the latest version should get loaded.
Actual behavior
CobiGen generates for both template sets incrementally, overwriting each other.
Steps to reproduce (bug) / Use Case of feature request (enhancement)
- Fix this ignored test:
Lines 117 to 151 in 07e7ad8
/** * Tests the usage of sample logic classes to be used in different template set versions. Test resources use an equal * utility class name with a different implementation to simulate a version a conflict * * @throws Exception test fails */ @Test @Ignore public void callClassLoadingTemplateSetTestWithVersionConflict() throws Exception { // Mocking CobiGen cobigen = CobiGenFactory.create(new File(testTemplateSetFileRootPath + "conflicted/template-sets").toURI()); Object input = cobigen.read( new File("src/test/java/com/devonfw/cobigen/systemtest/testobjects/io/generator/logic/api/to/InputEto.java") .toPath(), Charset.forName("UTF-8"), getClass().getClassLoader()); // Useful to see generates if necessary, comment the generationRootFolder above then File generationRootFolder = this.tmpFolder.newFolder("generationRootFolder"); // pre-processing List<TemplateTo> templates = cobigen.getMatchingTemplates(input); // Execution GenerationReportTo report = cobigen.generate(input, templates.get(0), Paths.get(generationRootFolder.toURI()), false); // Verification File expectedResult = new File(testTemplateSetFileRootPath, "expected-conflicted/generated.txt"); File generatedFile = new File(generationRootFolder, "generated.txt"); assertThat(report).isSuccessful(); assertThat(generatedFile).exists(); assertThat(generatedFile).isFile().hasSameContentAs(expectedResult); }
Related/Dependent Issues
Comments/Hints:
Affected version:
- OS: Windows/Linux/Mac?
- Browser: Chrome/Firefox/Safari?
Copilot