We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cookies
Cookie
val fakeCookies = Cookies(Nil) Mockito.when(userIdFromCookieService.get(fakeCookies)) .thenReturn(UserId("foobar"))
2.8.19
play.api.mvc.Cookies
scala> play.api.mvc.Cookies.apply(Nil) val res0: play.api.mvc.Cookies = Iterable() scala> play.api.mvc.Cookies.apply(Nil) val res1: play.api.mvc.Cookies = Iterable() scala> res0 == res1 val res2: Boolean = false
res0 == res1 // true
In Mokito, here is a work around:
def eqCookies(expected: Cookies): Cookies = { val matcher: ArgumentMatcher[Cookies] = (argument: Cookies) => { (argument == null && expected == null) || (argument != null && expected != null && argument.toSeq == expected.toSeq) } ThreadSafeMockingProgress .mockingProgress() .getArgumentMatcherStorage .reportMatcher(matcher) null }
val fakeCookies = Cookies(Nil) Mockito.when(userIdFromCookieService.get(eqCookies(fakeCookies))) .thenReturn(UserId("foobar"))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Cookies
are the same or not based on its contents? 🤔Play Version
2.8.19
API
play.api.mvc.Cookies
Operating System
JDK
Actual Behavior
Expected Behavior
P.S.
In Mokito, here is a work around:
The text was updated successfully, but these errors were encountered: