Interface TestableRequest

All Superinterfaces:
Request
All Known Implementing Classes:
TestableRequestImpl

public interface TestableRequest extends Request
An extended version of Request that allows the PageTester to control and override behavior, effectively simulating the portions of Request that are provided normally by a servlet container.
  • Method Details

    • clear

      Clears the internal parameters map.
      Returns:
      the request for further configuration
    • setPath

      Sets the path; the path should begin with a "/" character and contain everything from there to the start of query parameters (if any).
      Parameters:
      path -
      Returns:
      the request for further configuration
    • setLocale

      Sets the locale requested by "the browser".
      Returns:
      the request for further configuration
    • loadParameter

      TestableRequest loadParameter(String parameterName, String parameterValue)
      Loads a single parameter/value pair. This may define a new parameter, or add a value to a list of parameters.
      Returns:
      the request for further configuration
    • overrideParameter

      TestableRequest overrideParameter(String parameterName, String parameterValue)
      Overrides a parameter to the specific value, regardless of how the parameter was previously set.