org.apache.directory.server.integ.state
Class StartedPristineState

java.lang.Object
  extended by org.apache.directory.server.integ.state.AbstractState
      extended by org.apache.directory.server.integ.state.StartedPristineState
All Implemented Interfaces:
TestServerState

public class StartedPristineState
extends AbstractState

A test service state where the server is running and has not been used for any integration test since it was created.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.server.integ.state.AbstractState
context
 
Constructor Summary
StartedPristineState(TestServerContext context)
          Creates a new instance of StartedPristineState.
 
Method Summary
 void cleanup()
          Action where an attempt is made to erase the contents of the working directory used by the ldap server for various files including partition database files.
 void destroy()
          Action where an attempt is made to destroy the service.
 void shutdown()
          Action where an attempt is made to stop the server.
 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, InheritableServerSettings settings)
          Action where an attempt is made to run a test against the service.
 
Methods inherited from class org.apache.directory.server.integ.state.AbstractState
create, injectLdifs, revert
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StartedPristineState

public StartedPristineState(TestServerContext context)
Creates a new instance of StartedPristineState.

Parameters:
context - the test's context
Method Detail

cleanup

public void cleanup()
             throws java.io.IOException
Action where an attempt is made to erase the contents of the working directory used by the ldap server for various files including partition database files.

Specified by:
cleanup in interface TestServerState
Overrides:
cleanup in class AbstractState
Throws:
java.io.IOException - on errors while deleting the working directory

startup

public void startup()
             throws java.lang.Exception
Action where an attempt is made to start up the service.

Specified by:
startup in interface TestServerState
Overrides:
startup in class AbstractState
Throws:
java.lang.Exception - on failures to start the core directory service

shutdown

public void shutdown()
              throws java.lang.Exception
Action where an attempt is made to stop the server.

Specified by:
shutdown in interface TestServerState
Overrides:
shutdown in class AbstractState
Throws:
java.lang.Exception - on failures to stop the ldap server

destroy

public void destroy()
Action where an attempt is made to destroy the service. This entails nulling out reference to it and triggering garbage collection.

Specified by:
destroy in interface TestServerState
Overrides:
destroy in class AbstractState

test

public void test(org.junit.internal.runners.TestClass testClass,
                 org.junit.internal.runners.TestMethod testMethod,
                 org.junit.runner.notification.RunNotifier notifier,
                 InheritableServerSettings settings)
Action where an attempt is made to run a test against the service. All annotations should have already been processed for InheritableServerSettings yet they and others can be processed since we have access to the method annotations below

Specified by:
test in interface TestServerState
Overrides:
test in class AbstractState
Parameters:
testClass - the class whose test method is to be run
testMethod - the test method which is to be run
notifier - a notifier to report failures to
settings - the inherited settings and annotations associated with the test method


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.