Esempio n. 1
0
 @After
 public void tearDown() {
   try {
     factory.tearDown();
     component.stop();
   } catch (Exception e) {
     e.printStackTrace();
     Assert.fail();
   }
 }
Esempio n. 2
0
  @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();
    }
  }