de.telekom.test.bddwebapp.interaction.ScenarioInteraction Maven / Gradle / Ivy
Show all versions of bdd-web-app Show documentation
package de.telekom.test.bddwebapp.interaction;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import de.telekom.test.bddwebapp.api.RequestBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
/**
* Holds context variables that are needed in the entire JBehave Scenario.
*
* An Interaction is a spring bean which keeps ThreadLocal state information of a single specification execution available across different steps. The
* Interaction is setup and torn down before and after every specification execution.
*
* After a first implementation of scenario interaction by Sven Schomaker, working for Deutsche Telekom AG in 2013.
*
*
* @author Daniel Keiss {@literal }
*
* 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.
*/
@Component
public class ScenarioInteraction extends FlatInteraction {
private static final String BODY = "BODY";
private static final String PATH_PARAMS = "PATH_PARAMS";
private static final String QUERY_PARAMS = "QUERY_PARAMS";
private StoryInteraction storyInteraction;
@Autowired
private RequestBuilder requestBuilder;
/**
* Initializes this interaction with an Array JSON body.
*/
public List