All Downloads are FREE. Search and download functionalities are using the official Maven repository.

junitparams.internal.parameters.ParametersFromValue Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package junitparams.internal.parameters;

import junitparams.Parameters;
import org.junit.runners.model.FrameworkMethod;

class ParametersFromValue implements ParametrizationStrategy {

    private final Parameters parametersAnnotation;

    ParametersFromValue(FrameworkMethod frameworkMethod) {
        parametersAnnotation = frameworkMethod.getAnnotation(Parameters.class);
    }

    @Override
    public Object[] getParameters() {
        return parametersAnnotation.value();
    }

    @Override
    public boolean isApplicable() {
        return parametersAnnotation != null && parametersAnnotation.value().length > 0;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy