@Documented
@Inherited
@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface CaseDescription
By default, multiple cases in a parametrized scenario are described by just listing the parameter names with their corresponding values. Sometimes, however, it is useful to provide an explicit description the provides more semantic background for each case. This annotation can be used to define custom descriptions.
Modifier and Type | Fields and Description |
---|---|
static java.lang.String |
NO_VALUE
Dummy value to indicate that no value was set
|
Modifier and Type | Optional Element and Description |
---|---|
boolean |
formatValues
Whether or not the arguments should be formatted to string using JGiven formatter.
|
java.lang.Class<? extends CaseDescriptionProvider> |
provider
A custom implementation of the
CaseDescriptionProvider to provide a case description. |
java.lang.String |
value
The description of the test case.
|
public static final java.lang.String NO_VALUE
public abstract java.lang.String value
Placeholders of the form $i
can be used that will be filled with the values of the ith parameter, starting from 0.
For example, a value "Hi $0"
will be translated to "Hi JGiven"
if "JGiven" is the value of the first parameter of the test method.
public abstract java.lang.Class<? extends CaseDescriptionProvider> provider
CaseDescriptionProvider
to provide a case description.public abstract boolean formatValues