@After public void tearDown() { try { factory.tearDown(); component.stop(); } catch (Exception e) { e.printStackTrace(); Assert.fail(); } }
@Before public void setUp() { testContext = new Context(); component = new Component(); component.getServers().add(Protocol.HTTP, PORT); component.getClients().add(Protocol.CLAP); component.getClients().add(Protocol.FILE); component.getDefaultHost().attach(testApp); try { component.start(); factory.setUp(); } catch (Exception e) { e.printStackTrace(); Assert.fail(); } }