Description
openedon Aug 6, 2022
I have some assertions and extensions. These use some of the functionality from package org.junit.platform.commons.util
. Now I'm trying to upgrade to Java 11, but that package is only exported to a select set of JUnit modules. That makes it hard to achieve some functionality. I have switched to using classes like AnnotationSupport
instead of AnnotationUtils
and ReflectionSupport
instead of ReflectionUtils
, but not all is exposed through other classes.
Functionality I'm still using from org.junit.platform.commons.util
:
ReflectionUtils.parseFullyQualifiedMethodName
andReflectionUtils.getRequiredMethod
for functionality similar to@MethodSource
.- There is
ReflectionSupport.findMethod
, but perhaps adding these two methods could also be done.
- There is
ExceptionUtils.throwAsUncheckedException
for simplified error handling.- Note that this method is part of documentation, for example see
Assumptions.assumingThat
orThrowableCollector.assertEmpty
.
- Note that this method is part of documentation, for example see
The methods from ReflectionUtils
are easy enough to achieve - just copy them to ReflectionSupport
. That's also done for findMethod
and other methods. For ExceptionUtils
, perhaps a class ExceptionSupport
can be added in org.junit.platform.commons.support
.