org.apache.directory.server.protocol.shared
Class AbstractBackingStoreTest

java.lang.Object
  extended byTestCase
      extended byorg.apache.directory.server.protocol.shared.AbstractBackingStoreTest

public abstract class AbstractBackingStoreTest
extends TestCase

Base class for testing protocol providers against the JNDI provider.

Version:
$Rev: 434432 $, $Date: 2006-08-24 18:52:26 +0200 (Thu, 24 Aug 2006) $
Author:
Apache Directory Project
See Also:
Serialized Form

Field Summary
protected  MutableStartupConfiguration config
          the backing store configuration
protected  boolean doDelete
          a flag stating whether to delete the backing store for each test or not
protected  java.util.Hashtable env
           
protected  CoreContextFactory factory
           
 
Constructor Summary
AbstractBackingStoreTest()
           
 
Method Summary
protected  void doDelete(java.io.File wkdir)
          Deletes the working directory.
protected  void doTestApacheZone()
           
protected  void doTestExampleZone()
           
protected  void doTestSystemPartition()
          Test that the system partition was set up properly.
protected  java.lang.String escapedValue(java.lang.String value)
           
protected  javax.naming.Name getRelativeName(java.lang.String nameInNamespace, java.lang.String baseDn)
           
protected  void load(javax.naming.directory.DirContext ctx, java.lang.String ldifPath)
          Opens the LDIF file and loads the entries into the context.
protected  void loadPartition(java.lang.String partition, java.lang.String ldifFile)
           
protected  void printAttr(javax.naming.directory.Attributes attrs, java.lang.String id)
           
protected  void printAttrs(javax.naming.directory.Attributes attrs)
           
protected  void setUp()
           
protected  java.util.Hashtable setUpPartition()
           
protected  void tearDown()
          Shuts down the backing store, optionally deleting the database directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

doDelete

protected boolean doDelete
a flag stating whether to delete the backing store for each test or not


config

protected MutableStartupConfiguration config
the backing store configuration


factory

protected CoreContextFactory factory

env

protected java.util.Hashtable env
Constructor Detail

AbstractBackingStoreTest

public AbstractBackingStoreTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

loadPartition

protected void loadPartition(java.lang.String partition,
                             java.lang.String ldifFile)
                      throws javax.naming.NamingException
Throws:
javax.naming.NamingException

doTestSystemPartition

protected void doTestSystemPartition()
                              throws java.lang.Exception
Test that the system partition was set up properly.

Throws:
javax.naming.NamingException - if there are problems
java.lang.Exception

doTestApacheZone

protected void doTestApacheZone()
                         throws java.lang.Exception
Throws:
java.lang.Exception

doTestExampleZone

protected void doTestExampleZone()
                          throws java.lang.Exception
Throws:
java.lang.Exception

setUpPartition

protected java.util.Hashtable setUpPartition()
                                      throws javax.naming.NamingException
Throws:
javax.naming.NamingException

tearDown

protected void tearDown()
                 throws java.lang.Exception
Shuts down the backing store, optionally deleting the database directory.

Throws:
java.lang.Exception
See Also:
junit.framework.TestCase#tearDown()

doDelete

protected void doDelete(java.io.File wkdir)
                 throws java.io.IOException
Deletes the working directory.

Throws:
java.io.IOException

load

protected void load(javax.naming.directory.DirContext ctx,
                    java.lang.String ldifPath)
Opens the LDIF file and loads the entries into the context.


getRelativeName

protected javax.naming.Name getRelativeName(java.lang.String nameInNamespace,
                                            java.lang.String baseDn)
                                     throws javax.naming.NamingException
Throws:
javax.naming.NamingException

escapedValue

protected java.lang.String escapedValue(java.lang.String value)

printAttr

protected void printAttr(javax.naming.directory.Attributes attrs,
                         java.lang.String id)

printAttrs

protected void printAttrs(javax.naming.directory.Attributes attrs)