Пример #1
0
  @BeforeClass
  public static void setup() throws Exception {
    server = ServerBuilder.server().build();
    server.start();

    webdriverFacade = new WebDriverFacade();
    wl = new WebadminWebdriverLibrary(webdriverFacade, server.baseUri().toString());
  }
Пример #2
0
  @Test
  public void shouldRegisterASingleUri() throws Exception {
    WebServer webServer = mock(WebServer.class);

    NeoServerWithEmbeddedWebServer neoServer = mock(NeoServerWithEmbeddedWebServer.class);
    when(neoServer.baseUri()).thenReturn(new URI("http://localhost:7575"));
    when(neoServer.getWebServer()).thenReturn(webServer);

    Configuration config = new PropertiesConfiguration();
    String path = "/db/data";
    config.addProperty(Configurator.REST_API_PATH_PROPERTY_KEY, path);

    when(neoServer.getConfiguration()).thenReturn(config);

    RESTApiModule module = new RESTApiModule();
    module.start(neoServer, null);

    verify(webServer).addJAXRSPackages(any(List.class), anyString());
  }
 @AfterClass
 public static void stopServer() {
   server.stop();
 }
Пример #4
0
 @AfterClass
 public static void tearDown() throws Exception {
   webdriverFacade.closeBrowser();
   server.stop();
 }