|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.server.core.integ.state.AbstractState
public abstract class AbstractState
The abstract state of a test service, containing the default state transitions
Field Summary | |
---|---|
protected TestServiceContext |
context
The context for this test |
Constructor Summary | |
---|---|
protected |
AbstractState(TestServiceContext context)
Creates a new instance of AbstractState. |
Method Summary | |
---|---|
void |
cleanup()
Action where an attempt is made to erase the contents of the working directory used by the service for various files including partition database files. |
void |
create(InheritableSettings settings)
Action where an attempt is made to create the service. |
void |
destroy()
Action where an attempt is made to destroy the service. |
protected void |
injectLdifs(DirectoryService service,
InheritableSettings settings)
Inject the Ldifs if any |
void |
revert()
Action where an attempt is made to revert the service to it's initial start up state by using a previous snapshot. |
void |
shutdown()
Action where an attempt is made to shutdown the service. |
void |
startup()
Action where an attempt is made to start up the service. |
void |
test(org.junit.internal.runners.TestClass testClass,
org.junit.internal.runners.TestMethod testMethod,
org.junit.runner.notification.RunNotifier notifier,
InheritableSettings settings)
Action where an attempt is made to run a test against the service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final TestServiceContext context
Constructor Detail |
---|
protected AbstractState(TestServiceContext context)
context
- The associated contextMethod Detail |
---|
public void create(InheritableSettings settings) throws javax.naming.NamingException
create
in interface TestServiceState
settings
- The inherited settings
javax.naming.NamingException
- if we can't create the servicepublic void destroy()
destroy
in interface TestServiceState
public void cleanup() throws java.io.IOException
cleanup
in interface TestServiceState
java.io.IOException
- on errors while deleting the working directorypublic void startup() throws java.lang.Exception
startup
in interface TestServiceState
java.lang.Exception
- on failures to start the core directory servicepublic void shutdown() throws java.lang.Exception
shutdown
in interface TestServiceState
java.lang.Exception
- on failures to stop the core directory servicepublic void test(org.junit.internal.runners.TestClass testClass, org.junit.internal.runners.TestMethod testMethod, org.junit.runner.notification.RunNotifier notifier, InheritableSettings settings)
test
in interface TestServiceState
testClass
- the class whose test method is to be runtestMethod
- the test method which is to be runnotifier
- a notifier to report failures tosettings
- the inherited settings and annotations associated with
the test methodpublic void revert() throws java.lang.Exception
revert
in interface TestServiceState
java.lang.Exception
- on failures to revert the state of the core
directory serviceprotected void injectLdifs(DirectoryService service, InheritableSettings settings)
service
- the instantiated directory servicesettings
- the settings containing the ldif
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |