public class Parameters
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Parameters.MethodParameters
A parameter passing helper class.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NULL_VALUE |
Constructor and Description |
---|
Parameters() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
convertType(java.lang.Class type,
java.lang.String value,
java.lang.String paramName) |
static java.lang.Object[] |
createConfigurationParameters(java.lang.reflect.Method m,
java.util.Map<java.lang.String,java.lang.String> params,
java.lang.Object[] parameterValues,
ITestNGMethod currentTestMethod,
IAnnotationFinder finder,
XmlSuite xmlSuite,
ITestContext ctx,
ITestResult testResult)
Creates the parameters needed for the specified @Configuration
Method . |
static java.lang.Object[] |
createInstantiationParameters(java.lang.reflect.Constructor ctor,
java.lang.String methodAnnotation,
IAnnotationFinder finder,
java.lang.String[] parameterNames,
java.util.Map<java.lang.String,java.lang.String> params,
XmlSuite xmlSuite)
Creates the parameters needed for constructing a test class instance.
|
static java.lang.Object |
getInjectedParameter(java.lang.Class<?> c,
java.lang.reflect.Method method,
ITestContext context,
ITestResult testResult) |
static ParameterHolder |
handleParameters(ITestNGMethod testMethod,
java.util.Map<java.lang.String,java.lang.String> allParameterNames,
java.lang.Object instance,
Parameters.MethodParameters methodParams,
XmlSuite xmlSuite,
IAnnotationFinder annotationFinder,
java.lang.Object fedInstance)
If the method has parameters, fill them in.
|
public static final java.lang.String NULL_VALUE
public static java.lang.Object[] createInstantiationParameters(java.lang.reflect.Constructor ctor, java.lang.String methodAnnotation, IAnnotationFinder finder, java.lang.String[] parameterNames, java.util.Map<java.lang.String,java.lang.String> params, XmlSuite xmlSuite)
finder
- TODOpublic static java.lang.Object[] createConfigurationParameters(java.lang.reflect.Method m, java.util.Map<java.lang.String,java.lang.String> params, java.lang.Object[] parameterValues, ITestNGMethod currentTestMethod, IAnnotationFinder finder, XmlSuite xmlSuite, ITestContext ctx, ITestResult testResult)
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 java.lang.Object getInjectedParameter(java.lang.Class<?> c, java.lang.reflect.Method method, ITestContext context, ITestResult testResult)
public static java.lang.Object convertType(java.lang.Class type, java.lang.String value, java.lang.String paramName)
public static ParameterHolder handleParameters(ITestNGMethod testMethod, java.util.Map<java.lang.String,java.lang.String> allParameterNames, java.lang.Object instance, Parameters.MethodParameters methodParams, XmlSuite xmlSuite, IAnnotationFinder annotationFinder, java.lang.Object fedInstance)