Class CookieDescriptor
java.lang.Object
org.springframework.restdocs.snippet.AbstractDescriptor<CookieDescriptor>
org.springframework.restdocs.snippet.IgnorableDescriptor<CookieDescriptor>
org.springframework.restdocs.cookies.CookieDescriptor
A description of a cookie found in a request or response.
- Since:
- 3.0
- Author:
- Clyde Stubbs, Andy Wilkinson
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CookieDescriptor
(String name) Creates a newCookieDescriptor
describing the cookie with the givenname
. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
getName()
Returns the name for the cookie.final boolean
Returnstrue
if the described cookie is optional, otherwisefalse
.final CookieDescriptor
optional()
Marks the cookie as optional.Methods inherited from class org.springframework.restdocs.snippet.IgnorableDescriptor
ignored, isIgnored
Methods inherited from class org.springframework.restdocs.snippet.AbstractDescriptor
attributes, description, getAttributes, getDescription
-
Constructor Details
-
CookieDescriptor
Creates a newCookieDescriptor
describing the cookie with the givenname
.- Parameters:
name
- the name
-
-
Method Details
-
optional
-
getName
-
isOptional
public final boolean isOptional()Returnstrue
if the described cookie is optional, otherwisefalse
.- Returns:
true
if the described cookie is optional, otherwisefalse
-