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

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

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.core.integ.state.AbstractState
context
 
Constructor Summary
StartedPristineState(TestServiceContext 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 service 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 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 org.apache.directory.server.core.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(TestServiceContext 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 service for various files including partition database files.

Specified by:
cleanup in interface TestServiceState
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 TestServiceState
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 shutdown the service.

Specified by:
shutdown in interface TestServiceState
Overrides:
shutdown in class AbstractState
Throws:
java.lang.Exception - on failures to stop the core directory service

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 TestServiceState
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,
                 InheritableSettings settings)
Action where an attempt is made to run a test against the service. All annotations should have already been processed for InheritableSettings yet they and others can be processed since we have access to the method annotations below

Specified by:
test in interface TestServiceState
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.