示例#1
0
  @Override
  protected void before() throws Throwable {
    String connectionPropsLocation = getConnectionPropertiesLocation();
    ldapTestConfiguration = LDAPTestConfiguration.readConfiguration(connectionPropsLocation);

    if (ldapTestConfiguration.isStartEmbeddedLdapLerver()) {
      ldapEmbeddedServer = createServer();
      ldapEmbeddedServer.init();
      ldapEmbeddedServer.start();
    }
  }
示例#2
0
 @Override
 protected void after() {
   try {
     if (ldapEmbeddedServer != null) {
       ldapEmbeddedServer.stop();
       ldapEmbeddedServer = null;
       ldapTestConfiguration = null;
     }
   } catch (Exception e) {
     throw new RuntimeException("Error tearDown Embedded LDAP server.", e);
   }
 }