Created
August 26, 2012 21:42
-
-
Save joelso/3483765 to your computer and use it in GitHub Desktop.
withSession issue
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
import org.junit.Test; | |
import play.test.FakeRequest; | |
import static org.junit.Assert.assertEquals; | |
import static play.test.Helpers.fakeApplication; | |
import static play.test.Helpers.running; | |
public class WithSessionTest { | |
@Test | |
public void testWithSession() throws Exception { | |
running(fakeApplication(), new Runnable() { | |
public void run() { | |
FakeRequest req = new FakeRequest().withSession("1", "1").withSession("2", "2"); | |
//assertEquals(2, req.getWrappedRequest().session().data().size()); | |
assertEquals("1", req.getWrappedRequest().session().get("1").get()); | |
assertEquals("2", req.getWrappedRequest().session().get("2").get()); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment