Install
npx skillscat add datadog/dd-trace-java/migrate-groovy-to-java Install via the SkillsCat registry.
SKILL.md
Migrate test Groovy files to Java using JUnit 5
- List all groovy files of the current gradle module
- convert groovy files to Java using Junit 5
- make sure the tests are still passing after migration
- remove groovy files
When converting groovy code to java code make sure that:
- the Java code generated is compatible with JDK 8
- when translating Spock test, favor using
@CsvSourcewith|delimiters - when using a
@MethodSource, use the test method name, and suffix it with_arguments - when converting tuples, create light dedicated structure instead to keep the typing system
- Instead of checking a state and throwing an exception, use JUnit asserts
- Do not wrap checked exception and throwing a Runtime exception, prefer adding a throws clause at method declaration
- Do not mark local variables
final