/** * Override this method to setup the port to use. * * @return The TCP port used by the server */ protected int providePort() { return play.api.test.Helpers.testServerPort(); }
/** * A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium). * * @param webDriver The WebDriver instance to use. * @param baseUrl The base url to use for relative requests. * @throws Exception if the webdriver cannot be created. */ public TestBrowser(Class<? extends WebDriver> webDriver, String baseUrl) throws Exception { this(play.api.test.WebDriverFactory.apply(webDriver), baseUrl); }
/** * Creates a Test Browser. * * @param webDriver the class of webdriver. * @return the test browser. */ public static TestBrowser testBrowser(Class<? extends WebDriver> webDriver) { return testBrowser(webDriver, Helpers$.MODULE$.testServerPort()); }
/** * Constructs a in-memory (h2) database configuration to add to a fake application. * * @param name the database name. * @param options the database options. * @return a map of String containing database config info. */ public static Map<String, String> inMemoryDatabase(String name, Map<String, String> options) { return Scala.asJava(play.api.test.Helpers.inMemoryDatabase(name, Scala.asScala(options))); }
/** * Override this method to setup the port to use. * * @return The TCP port used by the server */ protected int providePort() { return play.api.test.Helpers.testServerPort(); }
/** * A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium). * * @param webDriver The WebDriver instance to use. * @param baseUrl The base url to use for relative requests. * @throws Exception if the webdriver cannot be created. */ public TestBrowser(Class<? extends WebDriver> webDriver, String baseUrl) throws Exception { this(play.api.test.WebDriverFactory.apply(webDriver), baseUrl); }
/** * Creates a Test Browser. * * @param webDriver the class of webdriver. * @return the test browser. */ public static TestBrowser testBrowser(Class<? extends WebDriver> webDriver) { return testBrowser(webDriver, Helpers$.MODULE$.testServerPort()); }
/** * Constructs a in-memory (h2) database configuration to add to a FakeApplication. */ public static Map<String,String> inMemoryDatabase(String name, Map<String, String> options) { return Scala.asJava(play.api.test.Helpers.inMemoryDatabase(name, Scala.asScala(options))); }
/** * Override this method to setup the port to use. * * @return The TCP port used by the server */ protected int providePort() { return play.api.test.Helpers.testServerPort(); }
/** * A test browser (Using Selenium WebDriver) with the FluentLenium API (https://github.com/Fluentlenium/FluentLenium). * * @param webDriver The WebDriver instance to use. * @param baseUrl The base url to use for relative requests. */ public TestBrowser(Class<? extends WebDriver> webDriver, String baseUrl) throws Exception { this(play.api.test.WebDriverFactory.apply(webDriver), baseUrl); }
/** * Creates a Test Browser. * * @param of the web driver to run the browser with. * @return the test browser. */ public static TestBrowser testBrowser(WebDriver of) { return testBrowser(of, Helpers$.MODULE$.testServerPort()); }
/** * Constructs a in-memory (h2) database configuration to add to a fake application. * * @param name the database name. * @param options the database options. * @return a map of String containing database config info. */ public static Map<String, String> inMemoryDatabase(String name, Map<String, String> options) { return Scala.asJava(play.api.test.Helpers.inMemoryDatabase(name, Scala.asScala(options))); }
/** * Creates a new Test server listening on port defined by configuration setting "testserver.port" (defaults to 19001). * * @return the test server. */ public static TestServer testServer() { return testServer(play.api.test.Helpers.testServerPort()); }
/** * Executes a block of code in a running server, with a test browser. * * @param server the test server. * @param webDriver the web driver class. * @param block the block of code to execute. */ public static void running(TestServer server, Class<? extends WebDriver> webDriver, final Consumer<TestBrowser> block) { running(server, play.api.test.WebDriverFactory.apply(webDriver), block); }
/** * Creates a Test Browser. * * @param of the web driver to run the browser with. * @return the test browser. */ public static TestBrowser testBrowser(WebDriver of) { return testBrowser(of, Helpers$.MODULE$.testServerPort()); }
/** * Creates a new Test server listening on port defined by configuration setting "testserver.port" (defaults to 19001) and using the given FakeApplication. */ public static TestServer testServer(Application app) { return testServer(play.api.test.Helpers.testServerPort(), app); }
/** * Creates a new Test server listening on port defined by configuration setting "testserver.port" (defaults to 19001) and using the given Application. * * @param app the application. * @return the test server. */ public static TestServer testServer(Application app) { return testServer(play.api.test.Helpers.testServerPort(), app); }
/** * Creates a new Test server listening on port defined by configuration setting "testserver.port" (defaults to 19001). * * @return the test server. */ public static TestServer testServer() { return testServer(play.api.test.Helpers.testServerPort()); }
/** * Creates a new Test server listening on port defined by configuration setting "testserver.port" (defaults to 19001). */ public static TestServer testServer() { return testServer(play.api.test.Helpers.testServerPort()); }
/** * Creates a new Test server listening on port defined by configuration setting "testserver.port" (defaults to 19001) and using the given Application. * * @param app the application. * @return the test server. */ public static TestServer testServer(Application app) { return testServer(play.api.test.Helpers.testServerPort(), app); }