ros2-java / ros2_java

Java and Android bindings for ROS2
Apache License 2.0
172 stars 93 forks source link

Migrate to JUnit 5 #123

Open jacobperron opened 4 years ago

jacobperron commented 4 years ago

Currently, unit tests depend on JUnit 4 explicitly (downloading it if it is not available):

https://github.com/ros2-java/ros2_java/blob/62918477f4fb8810d4df0ac9c9e67b885b635d01/rcljava_common/cmake/Modules/JavaExtra.cmake#L55-L67

By switching to JUnit 5, we can take advantage of new features and the extensibility of it's modular architecture.

At the moment, there aren't many instances I can point to that would justify switching, besides this TODO:

https://github.com/ros2-java/ros2_java/blob/cf2ef0707f7420f9b83e6c053775c9d52752a9e2/rosidl_generator_java/src/test/java/org/ros2/generator/InterfacesTest.java#L38-L39

I haven't investigated how easy it would be to switch; it may be as simple as update the CMake snippet referenced above.