Class MockParameterMap

java.lang.Object
org.springframework.webflow.core.collection.LocalParameterMap
org.springframework.webflow.test.MockParameterMap
All Implemented Interfaces:
Serializable, MapAdaptable<String,Object>, ParameterMap

public class MockParameterMap extends LocalParameterMap
A extension of parameter map that allows for mutation of parameters. Useful as a stub for testing.
Author:
Keith Donald
See Also:
  • Constructor Details

    • MockParameterMap

      public MockParameterMap()
      Creates a new parameter map, initially empty.
  • Method Details

    • put

      public MockParameterMap put(String parameterName, String parameterValue)
      Add a new parameter to this map.
      Parameters:
      parameterName - the parameter name
      parameterValue - the parameter value
      Returns:
      this, to support call chaining
    • put

      public MockParameterMap put(String parameterName, String[] parameterValues)
      Add a new multi-valued parameter to this map.
      Parameters:
      parameterName - the parameter name
      parameterValues - the parameter values
      Returns:
      this, to support call chaining
    • put

      public MockParameterMap put(String parameterName, org.springframework.web.multipart.MultipartFile parameterValues)
      Add a new multi-part file parameter to this map.
      Parameters:
      parameterName - the parameter name
      parameterValues - the parameter values
      Returns:
      this, to support call chaining
    • put

      public MockParameterMap put(String parameterName, List<org.springframework.web.multipart.MultipartFile> parameterValues)
      Add a new multi-valued multi-part file parameter to this map.
      Parameters:
      parameterName - the parameter name
      parameterValues - the parameter values
      Returns:
      this, to support call chaining