Package rife.test
Class MockCookie
java.lang.Object
jakarta.servlet.http.Cookie
rife.test.MockCookie
- All Implemented Interfaces:
Serializable,Cloneable
Extends a
Cookie by tracking the creation time and allowing max-age
expiration to be evaluated.- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe path that is used for a cookie that doesn't specify one itself. -
Constructor Summary
ConstructorsConstructorDescriptionMockCookie(Cookie cookie) Creates a new cookie with the same values as a standardCookie.MockCookie(String name, String value) Creates a new cookie with the provided name and value -
Method Summary
Methods inherited from class jakarta.servlet.http.Cookie
clone, equals, getAttribute, getAttributes, getComment, getDomain, getMaxAge, getName, getPath, getSecure, getValue, getVersion, hashCode, isHttpOnly, setAttribute, setComment, setDomain, setHttpOnly, setMaxAge, setPath, setSecure, setValue, setVersion, toString
-
Field Details
-
DEFAULT_PATH
The path that is used for a cookie that doesn't specify one itself.- Since:
- 1.10
- See Also:
-
-
Constructor Details
-
MockCookie
Creates a new cookie with the provided name and value- Parameters:
name- the name of the cookievalue- the value of the cookie- Since:
- 1.0
- See Also:
-
MockCookie
Creates a new cookie with the same values as a standardCookie.- Parameters:
cookie- the cookie that will provide all the values- Since:
- 1.0
- See Also:
-