org.ehoffman.module
Interface Module<T>

All Superinterfaces:
ModuleProvider<T>
All Known Subinterfaces:
PooledModule<T>

public interface Module<T>
extends ModuleProvider<T>

Indicates an interchangeable piece of a test Fixture. The Modules exposes service for consumption of a test method. It also specifies services it needs in order to provide it's services. Implementors of this class are expected to be thread safe. Which requires that the class be stateless, or that it contains a poolable set of services, and selects one for each test that needs to run. Testing will be run in a heavily multithreaded manner. Care must be taken in constructing implementations of this class.

Author:
rexhoffman

Method Summary
 T create(Map<String,?> dependencies)
           
 void destroy()
          Provides and needed clean up of this module.
 Map<String,Class<?>> getDependencyDefinition()
           
 String getModuleType()
          This is a key that is used to determine which modules are interchangeable in testing
 Class<? extends T> getTargetClass()
          This is the class that the TestNG-Extensions library,
 

Method Detail

getModuleType

String getModuleType()
This is a key that is used to determine which modules are interchangeable in testing

Specified by:
getModuleType in interface ModuleProvider<T>
Returns:

getTargetClass

Class<? extends T> getTargetClass()
This is the class that the TestNG-Extensions library,

Returns:

getDependencyDefinition

Map<String,Class<?>> getDependencyDefinition()
Returns:

create

T create(Map<String,?> dependencies)
Parameters:
dependencies -
Returns:

destroy

void destroy()
Provides and needed clean up of this module. This method will be called once on completion of the test suite.



Copyright © 2010-2011. All Rights Reserved.