public class MethodInvocationHelper extends Object
Constructor and Description |
---|
MethodInvocationHelper() |
Modifier and Type | Method and Description |
---|---|
protected static void |
invokeConfigurable(Object instance,
Object[] parameters,
IConfigurable configurableInstance,
Method thisMethod,
ITestResult testResult) |
protected static Iterator<Object[]> |
invokeDataProvider(Object instance,
Method dataProvider,
ITestNGMethod method,
ITestContext testContext,
Object fedInstance,
IAnnotationFinder annotationFinder) |
protected static void |
invokeHookable(Object testInstance,
Object[] parameters,
IHookable hookable,
Method thisMethod,
ITestResult testResult)
Invokes the
run method of the IHookable . |
protected static Object |
invokeMethod(Method thisMethod,
Object instance,
List<Object> parameters) |
protected static Object |
invokeMethod(Method thisMethod,
Object instance,
Object[] parameters) |
protected static void |
invokeMethodConsideringTimeout(ITestNGMethod tm,
ConstructorOrMethod method,
Object targetInstance,
Object[] params,
ITestResult testResult) |
protected static Object |
invokeMethodNoCheckedException(Method thisMethod,
Object instance,
List<Object> parameters) |
protected static void |
invokeWithTimeout(ITestNGMethod tm,
Object instance,
Object[] parameterValues,
ITestResult testResult)
Invokes a method on a separate thread in order to allow us to timeout the
invocation.
|
protected static void |
invokeWithTimeout(ITestNGMethod tm,
Object instance,
Object[] parameterValues,
ITestResult testResult,
IHookable hookable) |
protected static Object invokeMethodNoCheckedException(Method thisMethod, Object instance, List<Object> parameters)
protected static void invokeMethodConsideringTimeout(ITestNGMethod tm, ConstructorOrMethod method, Object targetInstance, Object[] params, ITestResult testResult) throws Throwable
Throwable
protected static Object invokeMethod(Method thisMethod, Object instance, List<Object> parameters) throws InvocationTargetException, IllegalAccessException
protected static Object invokeMethod(Method thisMethod, Object instance, Object[] parameters) throws InvocationTargetException, IllegalAccessException
protected static Iterator<Object[]> invokeDataProvider(Object instance, Method dataProvider, ITestNGMethod method, ITestContext testContext, Object fedInstance, IAnnotationFinder annotationFinder)
protected static void invokeHookable(Object testInstance, Object[] parameters, IHookable hookable, Method thisMethod, ITestResult testResult) throws Throwable
run
method of the IHookable
.testInstance
- the instance to invoke the method inparameters
- the parameters to be passed to IHookCallBack
thisMethod
- the method to be invoked through the IHookCallBack
testResult
- the current ITestResult
passed to
IHookable.run
NoSuchMethodException
IllegalAccessException
InvocationTargetException
Throwable
- thrown if the reflective call to
thisMethod results in an exceptionprotected static void invokeWithTimeout(ITestNGMethod tm, Object instance, Object[] parameterValues, ITestResult testResult) throws InterruptedException, ThreadExecutionException
Executor
and a
CountDownLatch
.protected static void invokeWithTimeout(ITestNGMethod tm, Object instance, Object[] parameterValues, ITestResult testResult, IHookable hookable) throws InterruptedException, ThreadExecutionException
protected static void invokeConfigurable(Object instance, Object[] parameters, IConfigurable configurableInstance, Method thisMethod, ITestResult testResult) throws Throwable
Throwable
Copyright © 2024. All rights reserved.