Package com.tngtech.jgiven
Interface CurrentStep
public interface CurrentStep
This interface can be injected into a stage by using the
ScenarioState
annotation. It provides programmatic access to the current executed step.- Since:
- 0.7.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(Attachment attachment) Adds an attachment to the current stepvoid
setComment
(String comment) Sets the comment of the step.void
setExtendedDescription
(String extendedDescription) Sets the extended description of the current stepvoid
Sets the name of the current step.
-
Method Details
-
addAttachment
Adds an attachment to the current step- Parameters:
attachment
- an attachment to add
-
setExtendedDescription
Sets the extended description of the current step- Parameters:
extendedDescription
- the extended description- See Also:
-
setName
Sets the name of the current step. Note that in general it is better to use theAs
annotation, to change the name of the step, because it can handle arguments in parametrized scenarios. If you use this method in a parameterized scenario and the step varies within that scenario, JGiven will not be able to create a data table.- Parameters:
name
- the new name of the step
-
setComment
Sets the comment of the step. Not that the comment should be a constant string and not depending on arguments of the step, otherwise the behavior of this method is undefined for parametrized scenarios. SeeStepComment
- Parameters:
comment
- the comment
-