org.testng.internal.DataProviderMethod Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng Show documentation
Show all versions of testng Show documentation
A testing framework for the JVM
package org.testng.internal;
import org.testng.IDataProviderMethod;
import org.testng.ITestContext;
import org.testng.annotations.IDataProviderAnnotation;
import java.lang.reflect.Method;
import java.util.List;
/**
* Represents an @{@link org.testng.annotations.DataProvider} annotated method.
*/
class DataProviderMethod implements IDataProviderMethod {
private final Object instance;
private final Method method;
private final IDataProviderAnnotation annotation;
DataProviderMethod(Object instance, Method method, IDataProviderAnnotation annotation) {
this.instance = instance;
this.method = method;
this.annotation = annotation;
}
@Override
public Object getInstance() {
return instance;
}
@Override
public Method getMethod() {
return method;
}
@Override
public String getName() {
return annotation.getName();
}
@Override
public boolean isParallel() {
return annotation.isParallel();
}
@Override
public List getIndices() {
return annotation.getIndices();
}
}