001package org.junit.experimental.theories.suppliers;
002
003import java.util.ArrayList;
004import java.util.List;
005
006import org.junit.experimental.theories.ParameterSignature;
007import org.junit.experimental.theories.ParameterSupplier;
008import org.junit.experimental.theories.PotentialAssignment;
009
010public class TestedOnSupplier extends ParameterSupplier {
011    @Override
012    public List<PotentialAssignment> getValueSources(ParameterSignature sig) {
013        List<PotentialAssignment> list = new ArrayList<PotentialAssignment>();
014        TestedOn testedOn = sig.getAnnotation(TestedOn.class);
015        int[] ints = testedOn.ints();
016        for (final int i : ints) {
017            list.add(PotentialAssignment.forValue("ints", i));
018        }
019        return list;
020    }
021}