-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
Description
Check:
Lines 154 to 178 in f3a4399
| @Test | |
| public void testLoadEnumClass() throws Exception { | |
| // Mocking | |
| Object containerInput = createTestDataAndConfigureMock(); | |
| // Useful to see generates if necessary, comment the generationRootFolder above then | |
| File generationRootFolder = this.tmpFolder.newFolder("generationRootFolder"); | |
| // pre-processing | |
| File templatesFolder = new File(testFileRootPath + "templates"); | |
| CobiGen target = CobiGenFactory.create(templatesFolder.toURI(), true); | |
| List<TemplateTo> templates = target.getMatchingTemplates(containerInput); | |
| // Execution | |
| GenerationReportTo report = target.generate(containerInput, templates.get(1), | |
| Paths.get(generationRootFolder.toURI()), false); | |
| // Verification | |
| File expectedResult = new File(testFileRootPath, "expected/Test2.java"); | |
| File generatedFile = new File(generationRootFolder, "com/devonfw/Test2.java"); | |
| assertThat(report).isSuccessful(); | |
| assertThat(generatedFile).exists(); | |
| assertThat(generatedFile).isFile().hasSameContentAs(expectedResult); | |
| } |