Package com.tngtech.jgiven.annotation
Annotation Type NamedFormats
-
@Retention(RUNTIME) @Target({PARAMETER,ANNOTATION_TYPE}) public @interface NamedFormats
Allow to define a set of identifiable formats (NamedFormat
).
One usage of such set is to define formats for (part or all) fields of a bean. In this case, everyNamedFormat.name()
in this set should match a field of this bean.
This set may then be used to define formats for fields of aTable
annotated parameter of a step method.
Example
Some POJO
class CoffeeWithPrice { String name; double price_in_EUR; Date lastPriceDate; CoffeeWithPrice(String name, double priceInEur, Date lastPriceDate) { this.name = name; this.price_in_EUR = priceInEur; this.lastPriceDate = lastPriceDate; } }
The Step Method
{@code
- Since:
- 0.15.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description NamedFormat[]
value
Array ofNamedFormat
-
-
-
Element Detail
-
value
NamedFormat[] value
Array ofNamedFormat
- Default:
- {}
-
-