Hi I had an authentication service which works on Request (some Header-Data and Cookie), Response (to set or delete a cookie) and session (Store userId and rememberMe-information).
In play 1.x it was easy to fake Request, Response, Cookie and Session. It could be easily set with Session.current().set(new Session())
. In play 2.0 this doesn't work anymore.
How can I add a cookie to a request? How could I manipulate the session? I saw there exists FakeApplication and FakeRequest but I didn't get it, how to work with them.
Any hint is appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…