001package org.junit.experimental.theories.suppliers;
002
003import static java.lang.annotation.ElementType.PARAMETER;
004
005import java.lang.annotation.Retention;
006import java.lang.annotation.RetentionPolicy;
007import java.lang.annotation.Target;
008
009import org.junit.experimental.theories.ParametersSuppliedBy;
010
011/**
012 * Annotating a {@link org.junit.experimental.theories.Theory Theory} method int
013 * parameter with @TestedOn causes it to be supplied with values from the
014 * ints array given when run as a theory by the
015 * {@link org.junit.experimental.theories.Theories Theories} runner. For
016 * example, the below method would be called three times by the Theories runner,
017 * once with each of the int parameters specified.
018 * 
019 * <pre>
020 * &#064;Theory
021 * public void shouldPassForSomeInts(&#064;TestedOn(ints={1, 2, 3}) int param) {
022 *     ...
023 * }
024 * </pre>
025 */
026@ParametersSuppliedBy(TestedOnSupplier.class)
027@Retention(RetentionPolicy.RUNTIME)
028@Target(PARAMETER)
029public @interface TestedOn {
030    int[] ints();
031}