Package org.testng.internal
Class DataProviderMethod
- java.lang.Object
-
- org.testng.internal.DataProviderMethod
-
- All Implemented Interfaces:
IDataProviderMethod
- Direct Known Subclasses:
DataProviderMethodRemovable
class DataProviderMethod extends java.lang.Object implements IDataProviderMethod
Represents an @DataProvider
annotated method.
-
-
Field Summary
Fields Modifier and Type Field Description private IDataProviderAnnotation
annotation
protected java.lang.Object
instance
protected java.lang.reflect.Method
method
-
Constructor Summary
Constructors Constructor Description DataProviderMethod(java.lang.Object instance, java.lang.reflect.Method method, IDataProviderAnnotation annotation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Integer>
getIndices()
java.lang.Object
getInstance()
java.lang.reflect.Method
getMethod()
java.lang.String
getName()
boolean
isParallel()
boolean
propagateFailureAsTestFailure()
-
-
-
Field Detail
-
instance
protected java.lang.Object instance
-
method
protected java.lang.reflect.Method method
-
annotation
private final IDataProviderAnnotation annotation
-
-
Constructor Detail
-
DataProviderMethod
DataProviderMethod(java.lang.Object instance, java.lang.reflect.Method method, IDataProviderAnnotation annotation)
-
-
Method Detail
-
getInstance
public java.lang.Object getInstance()
- Specified by:
getInstance
in interfaceIDataProviderMethod
- Returns:
- - The instance to which the data provider belongs to.
null
if the data provider is a static one.
-
getMethod
public java.lang.reflect.Method getMethod()
- Specified by:
getMethod
in interfaceIDataProviderMethod
- Returns:
- - A
Method
object that represents the actual @DataProvider
method.
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceIDataProviderMethod
- Returns:
- The name of this DataProvider.
-
isParallel
public boolean isParallel()
- Specified by:
isParallel
in interfaceIDataProviderMethod
- Returns:
- Whether this data provider should be run in parallel.
-
getIndices
public java.util.List<java.lang.Integer> getIndices()
- Specified by:
getIndices
in interfaceIDataProviderMethod
- Returns:
- Which indices to run from this data provider, default: all.
-
propagateFailureAsTestFailure
public boolean propagateFailureAsTestFailure()
- Specified by:
propagateFailureAsTestFailure
in interfaceIDataProviderMethod
- Returns:
- Whether failures in data providers should be treated as test failures
-
-