Created
December 2, 2013 02:21
-
-
Save codingricky/7743968 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 com.google.inject.AbstractModule; | |
| import com.google.inject.name.Names; | |
| import play.test.TestBrowser; | |
| import play.test.TestServer; | |
| import static play.test.Helpers.*; | |
| public class CucumberModule extends AbstractModule { | |
| private static int PORT = 3333; | |
| private TestServer testServer = testServer(PORT, fakeApplication(inMemoryDatabase())); | |
| private TestBrowser testBrowser = testBrowser(HTMLUNIT, PORT); | |
| @Override | |
| protected void configure() { | |
| bind(TestBrowser.class).toInstance(testBrowser); | |
| bind(TestServer.class).toInstance(testServer); | |
| bind(Integer.class).annotatedWith(Names.named("PORT")).toInstance(PORT); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment