public class Parameterized
extends org.junit.internal.runners.CompositeRunner
The custom runner Parameterized implements parameterized
tests. When running a parameterized test class, instances are created for the
cross-product of the test methods and the test data elements.
@RunWith(Parameterized.class)
public class FibonacciTest {
@Parameters
public static Collection
Each instance of FibonacciTest will be constructed using the two-argument
constructor and the data values in the @Parameters method.
| Modifier and Type | Class and Description |
|---|---|
static interface |
Parameterized.Parameters |
| Constructor and Description |
|---|
Parameterized(java.lang.Class<?> klass) |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Collection<java.lang.Object[]> |
eachOne(java.lang.Object... params) |
void |
run(RunNotifier notifier)
Run the tests for this runner.
|
public Parameterized(java.lang.Class<?> klass)
throws java.lang.Exception
java.lang.Exceptionpublic void run(RunNotifier notifier)
Runnerrun in class org.junit.internal.runners.CompositeRunnernotifier - will be notified of events while tests are being run--tests being
started, finishing, and failingpublic static java.util.Collection<java.lang.Object[]> eachOne(java.lang.Object... params)