org.junit.experimental.theories.suppliers.TestedOn Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of reactor-junit4 Show documentation
Show all versions of reactor-junit4 Show documentation
JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.
The newest version!
package org.junit.experimental.theories.suppliers;
import static java.lang.annotation.ElementType.PARAMETER;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.experimental.theories.ParametersSuppliedBy;
/**
* Annotating a {@link org.junit.experimental.theories.Theory Theory} method int
* parameter with @TestedOn causes it to be supplied with values from the
* ints array given when run as a theory by the
* {@link org.junit.experimental.theories.Theories Theories} runner. For
* example, the below method would be called three times by the Theories runner,
* once with each of the int parameters specified.
*
*
* @Theory
* public void shouldPassForSomeInts(@TestedOn(ints={1, 2, 3}) int param) {
* ...
* }
*
*/
@ParametersSuppliedBy(TestedOnSupplier.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(PARAMETER)
public @interface TestedOn {
int[] ints();
}