java.lang.Object
net.tangly.bdd.Scene
public class Scene
extends java.lang.Object
A scene is central to BDD or specification by example style of writing tests. It describes a use case in a story or specification and holds all the
information required to execute a specific scenario. The Scene class enables test writers to define scenarios (behaviors) using steps like "given",
"then", and "when" that are written as lambda expressions. The Scene class is the central unit of our custom extension that holds test method
specific state information. The state information can be passed around between the various steps of a scenario. We use the “BeforeEachCallback”
interface to prepare a Scene instance right before the invocation of a test method.
-
Constructor Summary
Constructors Constructor Description Scene(@NotNull java.lang.reflect.Method method) -
Method Summary
Modifier and Type Method Description Sceneand(java.lang.String description, java.util.function.Consumer<Scene> and)java.lang.Stringdescription()java.lang.Objectget(java.lang.String key)Phasegiven()Scenegiven(java.lang.String description, java.util.function.Consumer<Scene> given)java.lang.StringmethodName()voidput(java.lang.String key, java.lang.Object value)Scenerun()Phasethen()Scenethen(java.lang.String description, java.util.function.Consumer<Scene> then)Phasewhen()Scenewhen(java.lang.String description, java.util.function.Consumer<Scene> when)
-
Constructor Details
-
Scene
public Scene(@NotNull @NotNull java.lang.reflect.Method method)
-
-
Method Details