1 package junitparams.internal.parameters; 2 3 import junitparams.Parameters; 4 import org.junit.runners.model.FrameworkMethod; 5 6 class ParametersFromValue implements ParametrizationStrategy { 7 8 private final Parameters parametersAnnotation; 9 ParametersFromValue(FrameworkMethod frameworkMethod)10 ParametersFromValue(FrameworkMethod frameworkMethod) { 11 parametersAnnotation = frameworkMethod.getAnnotation(Parameters.class); 12 } 13 14 @Override getParameters()15 public Object[] getParameters() { 16 return parametersAnnotation.value(); 17 } 18 19 @Override isApplicable()20 public boolean isApplicable() { 21 return parametersAnnotation != null && parametersAnnotation.value().length > 0; 22 } 23 }