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 010/** 011 * @see org.junit.experimental.theories.suppliers.TestedOn 012 * @see org.junit.experimental.theories.ParameterSupplier 013 */ 014public class TestedOnSupplier extends ParameterSupplier { 015 @Override 016 public List<PotentialAssignment> getValueSources(ParameterSignature sig) { 017 List<PotentialAssignment> list = new ArrayList<PotentialAssignment>(); 018 TestedOn testedOn = sig.getAnnotation(TestedOn.class); 019 int[] ints = testedOn.ints(); 020 for (final int i : ints) { 021 list.add(PotentialAssignment.forValue("ints", i)); 022 } 023 return list; 024 } 025}