Package io.quarkus.test.junit
Interface TestMethodInvoker
-
public interface TestMethodInvokerAn SPI that allows modules that integrate withQuarkusTestExtensionto alter the invocation of the actual test method. Implementations are loaded from the same ClassLoader that loads the actual test method (so NOT the ClassLoader that loads the QuarkusTestExtension) which results inQuarkusTestExtensionhaving to invoke the method with reflection, but otherwise allows the implementation to (mostly) avoid dealing with class-loading.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleanhandlesMethodParamType(String paramClassName)Determine whether this method invoker handles a test method parameter on its ownObjectinvoke(Object actualTestInstance, Method actualTestMethod, List<Object> actualTestMethodArgs, String testClassName)Invoked by QuarkusTestExtension when the test method needs to actually be run.default ObjectmethodParamInstance(String paramClassName)booleansupportsMethod(Class<?> originalTestClass, Method originalTestMethod)Determines whether this SPI should handle the test method.
-
-
-
Method Detail
-
handlesMethodParamType
default boolean handlesMethodParamType(String paramClassName)
Determine whether this method invoker handles a test method parameter on its own
-
supportsMethod
boolean supportsMethod(Class<?> originalTestClass, Method originalTestMethod)
Determines whether this SPI should handle the test method. The class and method are those supplied by JUnit which means they have been loaded from the original ClassLoader that loaded the QuarkusTestExtension and NOT the ClassLoader that loaded this class.
-
invoke
Object invoke(Object actualTestInstance, Method actualTestMethod, List<Object> actualTestMethodArgs, String testClassName) throws Throwable
Invoked by QuarkusTestExtension when the test method needs to actually be run. The parameters being passed have been loaded by QuarkusTestExtension on the proper ClassLoader- Throws:
Throwable
-
-