|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| IParamsAssigner.java | - | - | - | - |
|
||||||||||||||
| 1 | /** | |
| 2 | * JTRunner is free software; you can redistribute it and/or modify it under the | |
| 3 | * terms of the GNU General Public License as published by the Free Software | |
| 4 | * Foundation; either version 2, or (at your option) any later version. | |
| 5 | */ | |
| 6 | ||
| 7 | package jtr.assigner; | |
| 8 | ||
| 9 | import jtr.config.RunnerConfig; | |
| 10 | import jtr.runners.*; | |
| 11 | ||
| 12 | /** | |
| 13 | * This interface defines the contract between JTR and the concrete | |
| 14 | * implementations in charge of performing the task of assigning values to | |
| 15 | * concrete <code>IRunner</code> instances under the control of both the | |
| 16 | * <code>TestRunManager</code> and the <code>AbstractRunner</code>. | |
| 17 | * | |
| 18 | * @author Francesco Russo (frusso@dev.java.net) | |
| 19 | * @version 4.0 | |
| 20 | * @since 1.0 | |
| 21 | * @see jtr.runners.IRunnerClean | |
| 22 | * @see jtr.runners.IRunnerParameterized | |
| 23 | * @see jtr.config.RunnerConfig | |
| 24 | */ | |
| 25 | public interface IParamsAssigner { | |
| 26 | /** | |
| 27 | * Performs the parameterization task over the array of | |
| 28 | * <code>IRunnerClean</code> provided as input, using the given | |
| 29 | * <code>RunnerConfig</code>. Note that a runner has to be in its | |
| 30 | * <code>CLEAN</code> in order to be parameterized. All the runners are | |
| 31 | * returned as instances of <code>IRunnerParameterized</code>. | |
| 32 | * | |
| 33 | * @param cRunners | |
| 34 | * IRunnerClean[] The runners in <code>CLEAN</code> state to be | |
| 35 | * parameterized | |
| 36 | * @param runnerConfig | |
| 37 | * RunnerConfig The <code>RunnerConfig</code> to be applied | |
| 38 | * @return IRunnerParameterized[] The runners in <code>PARAMETERIZED</code> | |
| 39 | * state | |
| 40 | */ | |
| 41 | public IRunnerParameterized[] assign(IRunnerClean[] cRunners, RunnerConfig runnerConfig); | |
| 42 | ||
| 43 | /** | |
| 44 | * According to this assigner behaviour this method states whether the | |
| 45 | * managed <code>IRunner</code> has to be reinitialized or not after each | |
| 46 | * run. | |
| 47 | * | |
| 48 | * @return boolean Whether reinitialization has to occur or not after each | |
| 49 | * run | |
| 50 | */ | |
| 51 | public boolean requiresReinitialization(); | |
| 52 | ||
| 53 | /** | |
| 54 | * Performs the re-assignment. This method makes sense if and only if | |
| 55 | * <code>requiresReinitialization()</code> returns <code>true</code>. | |
| 56 | * | |
| 57 | * @param cRunner | |
| 58 | * IRunnerClean The runner in <code>CLEAN</code> state to be | |
| 59 | * reinitialized | |
| 60 | * @return IRunnerParameterized The runner in <code>PARAMETERIZED</code> | |
| 61 | * state | |
| 62 | */ | |
| 63 | public IRunnerParameterized reAssign(IRunnerClean cRunner); | |
| 64 | ||
| 65 | /** | |
| 66 | * Brings the runner provided has parameter back to its first assignment. | |
| 67 | * | |
| 68 | * @param cRunner | |
| 69 | * IRunnerClean The runner in <code>CLEAN</code> state to be | |
| 70 | * reinitialized | |
| 71 | * @return IRunnerParameterized The runner in <code>PARAMETERIZED</code> | |
| 72 | * state | |
| 73 | */ | |
| 74 | public IRunnerParameterized backToFirstAssignment(IRunnerClean cRunner); | |
| 75 | } |
|
||||||||||