@Test public final void testNewVitamServerOnDefaultPort() { final JunitHelper junitHelper = JunitHelper.getInstance(); final int serverPort = junitHelper.findAvailablePort(); final int oldPort = VitamServerFactory.getDefaultPort(); VitamServerFactory.setDefaultPort(serverPort); final VitamServer server = VitamServerFactory.newVitamServerOnDefaultPort(); assertEquals(serverPort, server.getPort()); assertNull(server.getHandler()); assertFalse(server.isConfigured()); try { server.configure(null); fail("Should raized an axception"); } catch (final VitamApplicationServerException e) { } try { server.startAndJoin(); fail("Should raized an axception"); } catch (final VitamApplicationServerException e) { } junitHelper.releasePort(serverPort); VitamServerFactory.setDefaultPort(oldPort); }
public static VitamServer newVitamServerOnDefaultPort() { return newVitamServer(defaultPort); }
VitamServerFactory { public static VitamServer newVitamServerOnDefaultPort() { return newVitamServer(defaultPort); } }
VitamServerFactory { public static VitamServer newVitamServerOnDefaultPort() { return newVitamServer(defaultPort); } private  VitamServerFactory(); }
VitamServerFactory { public static VitamServer newVitamServerOnDefaultPort() { return newVitamServer(defaultPort); } private  VitamServerFactory(); static VitamServer newVitamServerOnDefaultPort(); static void setDefaultPort(int port); static int getDefaultPort(); static VitamServer newVitamServer(int port); static VitamServer newVitamServerWithoutConnector(int port); static VitamServer newVitamServerByJettyConf(final String jettyConfigFile); }
VitamServerFactory { public static VitamServer newVitamServerOnDefaultPort() { return newVitamServer(defaultPort); } private  VitamServerFactory(); static VitamServer newVitamServerOnDefaultPort(); static void setDefaultPort(int port); static int getDefaultPort(); static VitamServer newVitamServer(int port); static VitamServer newVitamServerWithoutConnector(int port); static VitamServer newVitamServerByJettyConf(final String jettyConfigFile);  }