![JAR search and dependency download from the Maven repository](/logo.png)
junitparams.internal.parameters.ParamsFromMethodCommon Maven / Gradle / Ivy
package junitparams.internal.parameters;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import junitparams.NamedParameters;
import org.junit.runners.model.FrameworkMethod;
import junitparams.Parameters;
import junitparams.internal.parameters.toarray.ParamsToArrayConverter;
class ParamsFromMethodCommon {
private final FrameworkMethod frameworkMethod;
ParamsFromMethodCommon(FrameworkMethod frameworkMethod) {
this.frameworkMethod = frameworkMethod;
}
Object[] paramsFromMethod(Class> sourceClass) {
String methodAnnotation = frameworkMethod.getAnnotation(Parameters.class).method();
if (methodAnnotation.isEmpty()) {
return invokeMethodWithParams(defaultMethodName(), sourceClass);
}
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy