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

junitparams.custom.combined.CombinedParametersProvider Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package junitparams.custom.combined;

import java.util.ArrayList;
import java.util.List;

import junitparams.custom.ParametersProvider;
import junitparams.internal.Utils;

public class CombinedParametersProvider implements ParametersProvider {

    private CombinedParameters combinedParameters;

    @Override
    public void initialize(CombinedParameters parametersAnnotation) {
        this.combinedParameters = parametersAnnotation;
    }

    @Override
    public Object[] getParameters() {
        List list = new ArrayList();
        for(String parameterArray : combinedParameters.value()) {
            list.add(Utils.splitAtCommaOrPipe(parameterArray));
        }

        return Cartesian.getCartesianProductOf(list);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy