Package org.graphwalker.core.model
Class Vertex
java.lang.Object
org.graphwalker.core.model.BuilderBase<Vertex,Vertex.RuntimeVertex>
org.graphwalker.core.model.CachedBuilder<Vertex,Vertex.RuntimeVertex>
org.graphwalker.core.model.Vertex
- All Implemented Interfaces:
Builder<Vertex.RuntimeVertex>
Vertex
The Vertex holds the information for a state in a model. The vertex is the verification point for a test. It's here where the test asserts that the system under test is in the expected state. The vertex is uniquely identified by its id. The source vertex is not mandatory, but in a model, there should be only one such instance. Also, the target vertex is not mandatory, but again, in a model, there should be only one such instance.- Author:
- Nils Olsson
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds an action to the vertex, which represents a piece of code that will be executed each time the vertex is being traversed.addActions(List<Action> actions) addActions(Action... actions) protected Vertex.RuntimeVertexCreates an immutable vertex from this vertex.Gets the lists of actions of the vertex.Gets the name of the shared state.setActions(List<Action> actions) Adds a list of actions to the vertex, which represents a pieces of code that will be executed each time the vertex is being traversed.setSharedState(String sharedState) Sets the name of the shared state of this vertex.Methods inherited from class org.graphwalker.core.model.CachedBuilder
addRequirement, build, invalidateCache, setId, setName, setProperties, setProperty, setRequirementsMethods inherited from class org.graphwalker.core.model.BuilderBase
getId, getName, getProperties, getProperty, getRequirements, hasProperty
-
Constructor Details
-
Vertex
public Vertex()
-
-
Method Details
-
addAction
Adds an action to the vertex, which represents a piece of code that will be executed each time the vertex is being traversed. The code is by default interpreted as javascript.- Parameters:
action- The action.- Returns:
- The vertex.
-
addActions
-
addActions
-
setActions
Adds a list of actions to the vertex, which represents a pieces of code that will be executed each time the vertex is being traversed. The code snippets is by default interpreted as javascript.- Parameters:
actions- The actions.- Returns:
- The vertex.
- See Also:
-
getActions
Gets the lists of actions of the vertex.- Returns:
- The actions
- See Also:
-
createCache
Creates an immutable vertex from this vertex.- Specified by:
createCachein classCachedBuilder<Vertex,Vertex.RuntimeVertex> - Returns:
- An immutable vertex as a RuntimeVertex
In the 2 models above, GraphWalker will create virtual edges, the dotted arrows. These edges will
allow passages between the 2 models.