|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Retention(value=RUNTIME) public @interface Parameters
THE annotation for the test parameters. Use it to say that a method takes some parameters and define how to obtain them.
| Optional Element Summary | |
|---|---|
String |
method
Parameter values returned by a method within the test class. |
Class<?> |
source
Parameter values defined externally. |
String[] |
value
Parameter values defined as a String array. |
public abstract String[] value
Example: @Parameters({
"1, joe, 26.4, true",
"2, angie, 37.2, false"})
public abstract Class<?> source
provide
returning Object[]. All such methods are used, so you can
group your examples. The resulting array should contain parameter sets in
its elements. Each parameter set must be another Object[] array, which
contains parameter values in its elements.
Example: @Parameters(source = PeopleProvider.class)
public abstract String method
@Parameters(method = "examplaryPeople")
You can use multiple methods to provide parameters - use comma to do it:
Example: @Parameters(method = "womenParams, menParams")
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||