I’ve a file with a bunch of top-level extension functions for JUnit 5 ExtensionContext
. Currently I have to specify the receiver for each and every one of the functions, which is repetitive and boilerplate. Is there a way to “extension class” such that all methods in it automatically acquire the receiver declared on the class? Something like:
object ExtensionContext.ExtensionContextUtils {
fun fn() {...}
}
Caller:
extensionContext.fn()