org.testng.internal
Class Parameters
java.lang.Object
org.testng.internal.Parameters
public class Parameters
- extends java.lang.Object
Methods that bind parameters declared in testng.xml to actual values
used to invoke methods.
- Author:
- Cedric Beust, Alexandru Popescu
Method Summary |
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,
ITestNGMethod currentTestMethod,
IAnnotationFinder finder,
XmlSuite xmlSuite,
ITestContext ctx)
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.util.Iterator<java.lang.Object[]> |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_VALUE
public static final java.lang.String NULL_VALUE
- See Also:
- Constant Field Values
Parameters
public Parameters()
createInstantiationParameters
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)
- Creates the parameters needed for constructing a test class instance.
- Parameters:
finder
- TODO
createConfigurationParameters
public static java.lang.Object[] createConfigurationParameters(java.lang.reflect.Method m,
java.util.Map<java.lang.String,java.lang.String> params,
ITestNGMethod currentTestMethod,
IAnnotationFinder finder,
XmlSuite xmlSuite,
ITestContext ctx)
- Creates the parameters needed for the specified @Configuration
Method
.
- Parameters:
m
- the configuraton methodparams
- currentTestMethod
- 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 finderxmlSuite
-
- Returns:
convertType
public static java.lang.Object convertType(java.lang.Class type,
java.lang.String value,
java.lang.String paramName)
handleParameters
public static java.util.Iterator<java.lang.Object[]> 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. Either by using a @DataProvider
if any was provided, or by looking up in testng.xml
- Returns:
- An Iterator over the values for each parameter of this
method.
Copyright © 2010. All Rights Reserved.