Closed MariusVolkhart closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
0c83398
) 91.20% compared to head (af3b52f
) 91.14%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Sorry, I just merged a bit too fast. But the change itself is solid!
@edward3h is there a test for the Java way we could adopt for Kotlin?
I'd probably go the route of writing a test that parses a template, produces generated files, and then compares the generated files against golden versions. Thoughts on that?
The challenge is that the jte-models
project is the only place where the imports are actually read. The KotlinCodeGenerator
doesn't care about the list of imports as it generates code directly.
Indeed, I think writing a test from the jte-models perspective would be ideal, since that's the project that needs the imports as you said.
The models project generated Kotlin code that didn't have the correct imports. This happened because the imports were not being tracked as imports in the KotlinCodeGenerator, only as code.