org.apache.directory.server.core.integ
Class InheritableSettings

java.lang.Object
  extended by org.apache.directory.server.core.integ.InheritableSettings

public class InheritableSettings
extends java.lang.Object

Inheritable settings of a test suite, test class, or test method.

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

Field Summary
static DirectoryServiceFactory DEFAULT_FACTORY
          the default factory to use if inheritance leads to a null value
static SetupMode DEFAULT_MODE
          the default setup mode to use if inheritance leads to null value
 
Constructor Summary
InheritableSettings(org.junit.runner.Description description)
          Creates a new InheritableSettings instance for test suites description.
InheritableSettings(org.junit.runner.Description description, InheritableSettings parent)
          Creates a new InheritableSettings instance based on a test object's description and it's parent's settings.
 
Method Summary
 Level getCleanupLevel()
           
 org.junit.runner.Description getDescription()
           
 DirectoryServiceFactory getFactory()
           
 java.util.List<java.lang.String> getLdifFiles(java.util.List<java.lang.String> ldifFiles)
          Get a list of files containing entries described using the LDIF format.
 java.util.List<java.lang.String> getLdifs(java.util.List<java.lang.String> ldifs)
          Get a list of entries from a LDIF declared as an annotation
 SetupMode getMode()
           
 InheritableSettings getParent()
           
 boolean isClassLevel()
           
 boolean isMethodLevel()
           
 boolean isSuiteLevel()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MODE

public static final SetupMode DEFAULT_MODE
the default setup mode to use if inheritance leads to null value


DEFAULT_FACTORY

public static final DirectoryServiceFactory DEFAULT_FACTORY
the default factory to use if inheritance leads to a null value

Constructor Detail

InheritableSettings

public InheritableSettings(org.junit.runner.Description description)
Creates a new InheritableSettings instance for test suites description.

Parameters:
description - JUnit description for the suite

InheritableSettings

public InheritableSettings(org.junit.runner.Description description,
                           InheritableSettings parent)
Creates a new InheritableSettings instance based on a test object's description and it's parent's settings.

Parameters:
description - JUnit description for the test object
parent - the parent settings or null if the test entity is a suite
Method Detail

getDescription

public org.junit.runner.Description getDescription()
Returns:
the description of the running test

getParent

public InheritableSettings getParent()
Returns:
the settings inherited from the parent

isSuiteLevel

public boolean isSuiteLevel()
Returns:
true if we are at the suite level

isClassLevel

public boolean isClassLevel()
Returns:
true if we are at the class level

isMethodLevel

public boolean isMethodLevel()
Returns:
true if we are at the method level

getMode

public SetupMode getMode()
Returns:
the test mode. Default to ROLLBACK

getFactory

public DirectoryServiceFactory getFactory()
                                   throws java.lang.IllegalAccessException,
                                          java.lang.InstantiationException
Returns:
the DirectoryService factory
Throws:
java.lang.IllegalAccessException - if we can't access the factory
java.lang.InstantiationException - if the DirectoryService can't be instanciated

getLdifs

public java.util.List<java.lang.String> getLdifs(java.util.List<java.lang.String> ldifs)
Get a list of entries from a LDIF declared as an annotation

Parameters:
ldifs - the list of LDIFs we want to feed
Returns:
a list of entries described using a LDIF format

getLdifFiles

public java.util.List<java.lang.String> getLdifFiles(java.util.List<java.lang.String> ldifFiles)
Get a list of files containing entries described using the LDIF format.

Parameters:
ldifFiles - the list to feed
Returns:
a list of files containing some LDIF data

getCleanupLevel

public Level getCleanupLevel()
Returns:
teh cleanup level. Defualt to SUITE


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