Package rife.test
Class MockCookie
java.lang.Object
jakarta.servlet.http.Cookie
rife.test.MockCookie
- All Implemented Interfaces:
Serializable
,Cloneable
Wraps a
Cookie
by tracking the creation time and allowing max-age
expiration to be evaluated.- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorDescriptionMockCookie
(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
-
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:
-