Description Check:
@ 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 );
}
Reactions are currently unavailable
You can’t perform that action at this time.
Check:
cobigen/cobigen/cobigen-core-systemtest/src/test/java/com/devonfw/cobigen/systemtest/ClassLoadingIT.java
Lines 154 to 178 in f3a4399