org.apache.qpid.junit.extensions
Interface SetupTaskAware

All Known Implementing Classes:
SetupTaskHandler

public interface SetupTaskAware

SetupTaskAware is an interface that tests that can accept injectable setup tasks may implement. Typically this is used by configurable decorator stack to inject setup tasks into tests. It is then up to the test case to run the tasks in the setup or threadSetup methods as it chooses.

Set up tasks should be chained so that they are executed in the order that they are applied. Tear down tasks should be chained so that they are executed in the reverse order to which they are applied. That way the set up and tear down tasks act as a 'task' stack, with nested setups and tear downs.

CRC Card
Responsibilities.
Handle injection of set up tasks.
Handle injection of tear down tasks.


Method Summary
 void chainSetupTask(Runnable task)
          Adds the specified task to the tests setup.
 void chainTearDownTask(Runnable task)
          Adds the specified task to the tests tear down.
 

Method Detail

chainSetupTask

void chainSetupTask(Runnable task)
Adds the specified task to the tests setup.

Parameters:
task - The task to add to the tests setup.

chainTearDownTask

void chainTearDownTask(Runnable task)
Adds the specified task to the tests tear down.

Parameters:
task - The task to add to the tests tear down.


Licensed to the Apache Software Foundation