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 |
Constructor and Description |
---|
Parameters() |
Modifier and Type | Method and Description |
---|---|
static Object |
convertType(Class type,
String value,
String paramName) |
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 |
getInjectedParameter(Class<?> c,
Method method,
ITestContext context,
ITestResult testResult) |
static ParameterHolder |
handleParameters(ITestNGMethod testMethod,
Map<String,String> allParameterNames,
Object instance,
Parameters.MethodParameters methodParams,
XmlSuite xmlSuite,
IAnnotationFinder annotationFinder,
Object fedInstance)
If the method has parameters, fill them in.
|
public static final String NULL_VALUE
public static Object[] createInstantiationParameters(Constructor ctor, String methodAnnotation, IAnnotationFinder finder, String[] parameterNames, Map<String,String> params, XmlSuite xmlSuite)
finder
- TODOpublic static Object[] createConfigurationParameters(Method m, Map<String,String> params, 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 Object getInjectedParameter(Class<?> c, Method method, ITestContext context, ITestResult testResult)
public static ParameterHolder handleParameters(ITestNGMethod testMethod, Map<String,String> allParameterNames, Object instance, Parameters.MethodParameters methodParams, XmlSuite xmlSuite, IAnnotationFinder annotationFinder, Object fedInstance)
Copyright © 2017. All Rights Reserved.