Created
July 2, 2012 16:38
-
-
Save jroper/3034154 to your computer and use it in GitHub Desktop.
Play sessions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
running(fakeApplication(), new Runnable() { | |
@Override | |
public void run() { | |
FakeRequest req = fakeRequest(); | |
for (int i = 0; i < 5; i++) { | |
req = req.withSession("key" + i, "value" + i); | |
} | |
for (int i = 0; i < 5; i++) { | |
if (!req.getWrappedRequest().session().get("key" + i).isDefined()) { | |
// Whether we reach this point or not depends on HashMap ordering | |
System.out.println("key" + i + " not found!"); | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment