I am using com.sun.codemodel.JCodeModel
to generate almost 1000 classes with associated JUnits for each one.
I also generate a JUnit Test Suite that executes the individual JUnit test cases.
To complete this code generation project i want to execute the JUnit test suite programmatically using final Result result = JUnitCore.runClasses(AllTests.class);
.
The difficulty i am having is that the execution of the JUnit Test Suite is not synchronised to the code generation. I need to be able to detect when com.sun.codemodel.JCodeModel.build()
method has completed my code generation and only then execute the JUnit Test Suite.
How can I know when com.sun.codemodel.JCodeModel.build()
method completes?