@Component public class ScenarioInteraction extends FlatInteraction
After a first implementation of scenario interaction by Sven Schomaker, working for Deutsche Telekom AG in 2013.
Copyright (c) 2018 Daniel Keiss, Deutsche Telekom AG This file is distributed under the conditions of the Apache License, Version 2.0. For details see the file license on the toplevel.
| Modifier and Type | Field and Description |
|---|---|
static String |
OBJECT_KEY_SEPARATOR |
context| Constructor and Description |
|---|
ScenarioInteraction() |
| Modifier and Type | Method and Description |
|---|---|
List<Object> |
arrayBody()
Initializes this interaction with an Array JSON body.
|
<T> Map<String,T> |
getMapFromStoryInteraction(String queryParams) |
Map<String,Object> |
mapBody() |
Map<String,String> |
mapPathParam() |
Map<String,String> |
mapQueryParam() |
default <S> S |
recall(Enum key)
Get some data in the interaction context.
|
default <S> S |
recall(String key)
Get some data in the interaction context.
|
default <S> List<S> |
recallList(Enum key) |
default <S> List<S> |
recallList(String key) |
default <S> Map<String,S> |
recallMap(Enum key) |
default <S> Map<String,S> |
recallMap(String key) |
default <S> S |
recallNotNull(Enum key) |
default <S> S |
recallNotNull(String key) |
default <S> S |
recallObject(Enum objectKey,
String attributeKey) |
default <S> S |
recallObject(String objectKey,
String attributeKey) |
default <S> S |
recallObjectNotNull(Enum objectKey,
String attributeKey) |
default <S> S |
recallObjectNotNull(String objectKey,
String attributeKey) |
default void |
remember(Enum key,
Object value)
Store some data in the interaction context for later use.
|
void |
rememberFromStoryInteraction(String key)
Store some data from story interaction to the scenario interaction context
|
default void |
rememberObject(Enum entityKey,
String objectKey,
Object value) |
default void |
rememberObject(String entityKey,
Map<String,Object> object) |
default void |
rememberObject(String entityKey,
String objectKey,
Object value) |
void |
rememberObjectFromStoryInteraction(String entityKey,
String objectKey)
Store an object from story interaction for an specific entity in the scenario interaction context.
|
default <S> void |
rememberToList(Enum key,
S value) |
default <S> void |
rememberToList(String key,
S value) |
void |
setStoryInteraction(StoryInteraction storyInteraction) |
void |
startInteraction() |
getContext, logAllPossibleKeysWithType, logAllPossibleKeysWithValue, remember, stopInteractionpublic static final String OBJECT_KEY_SEPARATOR
public void startInteraction()
startInteraction in class FlatInteractionpublic void rememberFromStoryInteraction(String key)
public void rememberObjectFromStoryInteraction(String entityKey, String objectKey)
public void setStoryInteraction(StoryInteraction storyInteraction)
public void remember(Enum key, Object value)
public <S> S recall(String key)
public <S> S recall(Enum key)
public <S> S recallNotNull(String key)
public <S> S recallNotNull(Enum key)
public <S> void rememberToList(String key, S value)
public <S> void rememberToList(Enum key, S value)
Copyright © 2017–2019. All rights reserved.