001 package org.junit.experimental.theories.suppliers; 002 003 import java.util.ArrayList; 004 import java.util.List; 005 006 import org.junit.experimental.theories.ParameterSignature; 007 import org.junit.experimental.theories.ParameterSupplier; 008 import org.junit.experimental.theories.PotentialAssignment; 009 010 /** 011 * @see org.junit.experimental.theories.suppliers.TestedOn 012 * @see org.junit.experimental.theories.ParameterSupplier 013 */ 014 public 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 }