コード例 #1
0
 @Override
 protected void after() {
   super.after();
   if (server != null) {
     server.stop();
   }
 }
コード例 #2
0
  @Override
  protected void before() throws Throwable {
    super.before();

    File hsqlHome = new File("target/temporary/hsqldb/" + name);
    if (hsqlHome.exists()) {
      hsqlHome.delete();
    }
    hsqlHome.mkdirs();

    String dbHome = "file:" + hsqlHome.getAbsolutePath();

    HsqlProperties p = new HsqlProperties();
    p.setProperty("server.database.0", dbHome);
    p.setProperty("server.dbname.0", name);
    p.setProperty("server.port", port);
    server = new Server();
    server.setProperties(p);
    server.setLogWriter(new PrintWriter(System.out));
    server.setErrWriter(new PrintWriter(System.err));
    server.start();
  }
コード例 #3
0
 @Override
 protected void after() {
   super.after();
   webRule.after();
 }
コード例 #4
0
 @Override
 protected void before() throws Throwable {
   super.before();
   webRule.before();
 }