|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.directory.server.core.unit.AbstractTestCase
public abstract class AbstractTestCase
A simple testcase for testing JNDI provider functionality.
| Field Summary | |
|---|---|
protected MutableStartupConfiguration |
configuration
|
protected boolean |
doDelete
flag whether to delete database files for each test or not |
static java.lang.String |
LDIF
|
protected java.lang.String |
password
|
protected javax.naming.ldap.LdapContext |
sysRoot
the context root for the system partition |
protected java.util.List |
testEntries
A testEntries of entries as Attributes to add to the DIT for testing |
protected java.lang.String |
username
|
| Constructor Summary | |
|---|---|
protected |
AbstractTestCase(java.lang.String username,
java.lang.String password)
|
| Method Summary | |
|---|---|
protected void |
doDelete(java.io.File wkdir)
Deletes the Eve working directory. |
protected java.util.Hashtable |
getOverriddenEnvironment()
|
protected void |
overrideEnvironment(java.lang.String key,
java.lang.Object value)
Overrides default JNDI environment properties. |
protected void |
setLdifPath(java.lang.String ldifPath)
Sets the LDIF path to use. |
protected void |
setLdifPath(java.lang.String ldifPath,
java.lang.Class loadClass)
Sets the LDIF path as a relative resource path to use with the loadClass parameter to load the resource. |
protected void |
setLoadClass(java.lang.Class loadClass)
|
protected javax.naming.ldap.LdapContext |
setSysRoot(java.util.Hashtable env)
Sets the system root taking into account the extras and overrides properties. |
protected javax.naming.ldap.LdapContext |
setSysRoot(java.lang.String user,
java.lang.String passwd,
Configuration cfg)
Sets and returns the system root. |
protected void |
setUp()
Get's the initial context factory for the provider's ou=system context root. |
protected void |
tearDown()
Sets the system context root to null. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LDIF
protected final java.lang.String username
protected final java.lang.String password
protected javax.naming.ldap.LdapContext sysRoot
protected boolean doDelete
protected MutableStartupConfiguration configuration
protected java.util.List testEntries
| Constructor Detail |
|---|
protected AbstractTestCase(java.lang.String username,
java.lang.String password)
| Method Detail |
|---|
protected void setLdifPath(java.lang.String ldifPath,
java.lang.Class loadClass)
ldifPath - the relative resource path to the LDIF fileloadClass - the class used to load the LDIF as a resource streamprotected void setLdifPath(java.lang.String ldifPath)
ldifPath - the path to the LDIF file
protected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.ExceptionTestCase.setUp()
protected void doDelete(java.io.File wkdir)
throws java.io.IOException
java.io.IOException
protected javax.naming.ldap.LdapContext setSysRoot(java.lang.String user,
java.lang.String passwd,
Configuration cfg)
throws javax.naming.NamingException
user - the username for authenticating as this userpasswd - the password of the user
javax.naming.NamingException - if there is a failure of any kind
protected javax.naming.ldap.LdapContext setSysRoot(java.util.Hashtable env)
throws javax.naming.NamingException
env - an environment to use while setting up the system root.
javax.naming.NamingException - if there is a failure of any kind
protected void overrideEnvironment(java.lang.String key,
java.lang.Object value)
protected java.util.Hashtable getOverriddenEnvironment()
protected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.ExceptionTestCase.tearDown()protected void setLoadClass(java.lang.Class loadClass)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||