junitparams.custom.ParametersProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JUnitParams Show documentation
Show all versions of JUnitParams Show documentation
Better parameterised tests for JUnit
package junitparams.custom;
import org.junit.runners.model.FrameworkMethod;
import java.lang.annotation.Annotation;
/**
* An interface for custom parameters providers. To be used with {@link CustomParameters} annotation.
* Must have a default no-args constructor.
*
* @param type of annotation mentioning this provider
*/
public interface ParametersProvider {
/**
* Initializes this provider - you can read your custom annotation config here.
*
* @param parametersAnnotation parameters annotation on test method
* @param frameworkMethod test method
*/
void initialize(A parametersAnnotation, FrameworkMethod frameworkMethod);
/**
* Actual parameters generation
*
* @return parameters for test method calls
*/
Object[] getParameters();
}