Package com.tngtech.jgiven
Interface CurrentStep
-
public interface CurrentStep
This interface can be injected into a stage by using theScenarioState
annotation. It provides programmatic access to the current executed step.- Since:
- 0.7.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAttachment(Attachment attachment)
Adds an attachment to the current stepvoid
setComment(java.lang.String comment)
Sets the comment of the step.void
setExtendedDescription(java.lang.String extendedDescription)
Sets the extended description of the current stepvoid
setName(java.lang.String name)
Sets the name of the current step.
-
-
-
Method Detail
-
addAttachment
void addAttachment(Attachment attachment)
Adds an attachment to the current step- Parameters:
attachment
- an attachment to add
-
setExtendedDescription
void setExtendedDescription(java.lang.String extendedDescription)
Sets the extended description of the current step- Parameters:
extendedDescription
- the extended description- See Also:
ExtendedDescription
-
setName
void setName(java.lang.String name)
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
void setComment(java.lang.String comment)
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
-
-