public class Parameters extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Parameters.MethodParameters
A parameter passing helper class.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
NULL_VALUE
Deprecated.
|
| Constructor and Description |
|---|
Parameters() |
| Modifier and Type | Method and Description |
|---|---|
static Object[] |
createConfigurationParameters(Method m,
Map<String,String> params,
Object[] parameterValues,
ITestNGMethod currentTestMethod,
IAnnotationFinder finder,
XmlSuite xmlSuite,
ITestContext ctx,
ITestResult testResult)
Creates the parameters needed for the specified
@Configuration Method
. |
static Object[] |
createInstantiationParameters(Constructor<?> ctor,
String methodAnnotation,
IAnnotationFinder finder,
String[] parameterNames,
Map<String,String> params,
XmlSuite xmlSuite)
Creates the parameters needed for constructing a test class instance.
|
static Object[] |
getParametersFromIndex(Iterator<Object[]> parametersValues,
int index) |
static ParameterHolder |
handleParameters(ITestObjectFactory objectFactory,
ITestNGMethod testMethod,
Map<String,String> allParameterNames,
Object instance,
Parameters.MethodParameters methodParams,
XmlSuite xmlSuite,
IAnnotationFinder annotationFinder,
Object fedInstance,
DataProviderHolder holder)
If the method has parameters, fill them in.
|
static ParameterHolder |
handleParameters(ITestObjectFactory objectFactory,
ITestNGMethod testMethod,
Map<String,String> allParameterNames,
Object instance,
Parameters.MethodParameters methodParams,
XmlSuite xmlSuite,
IAnnotationFinder annotationFinder,
Object fedInstance,
DataProviderHolder holder,
String annotationName)
If the method has parameters, fill them in.
|
static Object[] |
injectParameters(Object[] parameterValues,
Method method,
ITestContext context)
Gets an array of parameter values returned by data provider or the ones that are injected based
on parameter type.
|
@Deprecated public static final String NULL_VALUE
public static Object[] createInstantiationParameters(Constructor<?> ctor, String methodAnnotation, IAnnotationFinder finder, String[] parameterNames, Map<String,String> params, XmlSuite xmlSuite)
public static Object[] createConfigurationParameters(Method m, Map<String,String> params, Object[] parameterValues, @Nullable ITestNGMethod currentTestMethod, IAnnotationFinder finder, XmlSuite xmlSuite, ITestContext ctx, ITestResult testResult)
@Configuration Method
.m - the configuraton methodcurrentTestMethod - the current @Test method or null if no @Test is available
(this is not only in case the configuration method is a @Before/@AfterMethodfinder - the annotation finderpublic static ParameterHolder handleParameters(ITestObjectFactory objectFactory, ITestNGMethod testMethod, Map<String,String> allParameterNames, Object instance, Parameters.MethodParameters methodParams, XmlSuite xmlSuite, IAnnotationFinder annotationFinder, Object fedInstance, DataProviderHolder holder)
<parameters> in testng.xmlpublic static ParameterHolder handleParameters(ITestObjectFactory objectFactory, ITestNGMethod testMethod, Map<String,String> allParameterNames, Object instance, Parameters.MethodParameters methodParams, XmlSuite xmlSuite, IAnnotationFinder annotationFinder, Object fedInstance, DataProviderHolder holder, String annotationName)
<parameters> in testng.xmlpublic static Object[] injectParameters(Object[] parameterValues, Method method, ITestContext context) throws TestNGException
NoInjection annotationparameterValues - parameter values from a data providermethod - method to be invokedcontext - test contextTestNGExceptionCopyright © 2025. All rights reserved.