A collection of JUnit Jupiter sample extensions.
-
The
RandomParametersExtension
showcases theParameterResolver
extension API by providing injection support for random values at the method parameter level. -
The
@CartesianProductTest
showcases the@TestTemplate
extension API by providing a sample implementation for invoking a method multiple times. It uses theTestTemplateInvocationContextProvider
,TestTemplateInvocationContext
and theParameterResolver
extension points to generate the cartesian product from a single or n-ary source sets.
For real-world usage examples of the JUnit Jupiter Extension APIs, check out the list of third-party extensions, e.g. the ones provided by Spring and Mockito.