Package com.tngtech.jgiven.annotation
Annotation Interface As
This annotation can be used to override the default representation for the items it was annotated with in the report.
Works on step method, test method or class name.
Note that the '$' character keeps its special meaning and will be replaced with step arguments
@As("some (complicated) step") public SELF some_complicated_step() { ... }
@As("Some 'special' scenario description") @Test public void some_special_scenario_description() { ... }
- Since:
- 0.7.4. Since 0.9.0 this annotation can be applied to test classes as well
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass<? extends AsProvider>
An optional provider to generate the representation of the stage method, scenario or scenario class.The alternate representation of the step or scenario summary. -
Field Summary
-
Field Details
-
NO_VALUE
Dummy value to indicate that no value was set- See Also:
-
-
Element Details
-
value
String valueThe alternate representation of the step or scenario summary.- Default:
- " - no value - "
-
provider
Class<? extends AsProvider> providerAn optional provider to generate the representation of the stage method, scenario or scenario class.The class that implements
AsProvider
interface must be a public non-abstract class that is not a non-static inner class and must have a public default constructor.If this attribute is set, the
value()
attribute is ignored.- Since:
- 0.12.0
- Default:
- com.tngtech.jgiven.impl.params.DefaultAsProvider.class
-