All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Search JAR files by class name

Source code: Class TestedOnSupplier.java part of junit version 4.12

package org.junit.experimental.theories.suppliers;

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

import org.junit.experimental.theories.ParameterSignature;
import org.junit.experimental.theories.ParameterSupplier;
import org.junit.experimental.theories.PotentialAssignment;

/**
 * @see org.junit.experimental.theories.suppliers.TestedOn
 * @see org.junit.experimental.theories.ParameterSupplier
 */
public class TestedOnSupplier extends ParameterSupplier {
    @Override
    public List getValueSources(ParameterSignature sig) {
        List list = new ArrayList();
        TestedOn testedOn = sig.getAnnotation(TestedOn.class);
        int[] ints = testedOn.ints();
        for (final int i : ints) {
            list.add(PotentialAssignment.forValue("ints", i));
        }
        return list;
    }
}




© 2018 Weber Informatics LLC