public final class TestWriterUtils extends Object
Modifier and Type | Method and Description |
---|---|
static List<Map.Entry<String,String>> |
getCookieParameters(ParamData param)
Returns the set of request cookie parameter bindings defined by the given
COOKIE parameter. |
static Optional<String> |
getHeaderParameterValue(ParamData param)
Returns the value of the given
HEADER parameter. |
static String |
getPathParameterValue(ParamData param)
Returns the value of the given
PATH parameter. |
static String |
getPathParameterValue(ParamData param,
boolean uriEncoded)
Returns the value of the given
PATH parameter. |
static List<Map.Entry<String,String>> |
getQueryParameters(ParamData param)
Returns the set of request query parameter bindings defined by the given
QUERY parameter. |
static List<Map.Entry<String,String>> |
getQueryParameters(ParamData param,
boolean uriEncoded)
Returns the set of request query parameter bindings defined by the given
QUERY parameter. |
static String |
stringLiteral(Object value)
Returns a string containing the source code for a Java string literal representing the given value.
|
public static List<Map.Entry<String,String>> getQueryParameters(ParamData param)
QUERY
parameter.
All parameter names and values are returned without URI encodeding.public static List<Map.Entry<String,String>> getQueryParameters(ParamData param, boolean uriEncoded)
QUERY
parameter.public static String getPathParameterValue(ParamData param)
PATH
parameter.
The result is returned without URI encodeding.public static String getPathParameterValue(ParamData param, boolean uriEncoded)
PATH
parameter.public static Optional<String> getHeaderParameterValue(ParamData param)
HEADER
parameter.
Returns Optional.empty()
if no value is defined for this parameter.public static List<Map.Entry<String,String>> getCookieParameters(ParamData param)
COOKIE
parameter.
All parameter names and values are URI-encoded if necessary.Copyright © 2024 The Cornutum Project. All rights reserved.