JTR 5.0 API Documentation

jtr.assigner
Interface IParamsAssigner

All Known Implementing Classes:
AbstractParamsAssigner, CyclicParamsAssigner, IndexedParamsAssigner

public interface IParamsAssigner

This interface defines the contract between JTR and the concrete implementations in charge of performing the task of assigning values to concrete IRunner instances under the control of both the TestRunManager and the AbstractRunner.

Since:
1.0
Version:
5.0
Author:
Francesco Russo (frusso@dev.java.net)
See Also:
IRunnerClean, IRunnerParameterized, RunnerConfig

Method Summary
 IRunnerParameterized[] assign(IRunnerClean[] cRunners, RunnerConfig runnerConfig)
          Performs the parameterization task over the array of IRunnerClean provided as input, using the given RunnerConfig.
 IRunnerParameterized backToFirstAssignment(IRunnerClean cRunner)
          Brings the runner provided has parameter back to its first assignment.
 boolean isReinitializationForced()
          This method reports whether or no the assigner must perform parameters-assignment to its runner instance due to the presence of some sort of dynamic parameter(s) among those required by the managed runner.
 IRunnerParameterized reAssign(IRunnerClean cRunner)
          Performs the re-assignment.
 boolean requiresReinitialization()
          According to this assigner behaviour this method states whether the managed IRunner has to be reinitialized or not after each run.
 

Method Detail

assign

IRunnerParameterized[] assign(IRunnerClean[] cRunners,
                              RunnerConfig runnerConfig)
Performs the parameterization task over the array of IRunnerClean provided as input, using the given RunnerConfig. Note that a runner has to be in its CLEAN state in order to be parameterized. All the runners are returned as instances of IRunnerParameterized.

Parameters:
cRunners - IRunnerClean[] The runners in CLEAN state to be parameterized
runnerConfig - RunnerConfig The RunnerConfig to be applied
Returns:
IRunnerParameterized[] The runners in PARAMETERIZED state

requiresReinitialization

boolean requiresReinitialization()
According to this assigner behaviour this method states whether the managed IRunner has to be reinitialized or not after each run.

Returns:
boolean Whether reinitialization has to occur or not after each run

isReinitializationForced

boolean isReinitializationForced()
This method reports whether or no the assigner must perform parameters-assignment to its runner instance due to the presence of some sort of dynamic parameter(s) among those required by the managed runner.

Returns:
Whether the reinitializaion must be forced or not

reAssign

IRunnerParameterized reAssign(IRunnerClean cRunner)
Performs the re-assignment. This method makes sense if and only if requiresReinitialization() returns true.

Parameters:
cRunner - IRunnerClean The runner in CLEAN state to be reinitialized
Returns:
IRunnerParameterized The runner in PARAMETERIZED state

backToFirstAssignment

IRunnerParameterized backToFirstAssignment(IRunnerClean cRunner)
Brings the runner provided has parameter back to its first assignment.

Parameters:
cRunner - IRunnerClean The runner in CLEAN state to be reinitialized
Returns:
IRunnerParameterized The runner in PARAMETERIZED state

The JTR Project is licensed under GPL version 2