public class ExecuteTaskHelper extends Object
Constructor and Description |
---|
ExecuteTaskHelper()
Create so that all outputs occur, and with default
TaskArguments . |
ExecuteTaskHelper(boolean copyNonIdentical)
Create so that all outputs occur, and with default
TaskArguments . |
ExecuteTaskHelper(Optional<String> specificOutput,
TaskArguments taskArguments,
boolean copyNonIdentical)
Create with specific arguments, not necessarily the defaults.
|
Modifier and Type | Method and Description |
---|---|
<T extends InputFromManager,S,V extends Task<T,S>> |
assertExpectedTaskOutputs(List<T> inputs,
V task,
Path pathDirectoryOutput,
String pathDirectorySaved,
Iterable<String> pathsFileToCompare)
Executes a task on a multiple inputs and asserts expected outputs - with task arguments.
|
<T extends InputFromManager,S,V extends Task<T,S>> |
assertExpectedTaskOutputs(T input,
V task,
Path pathDirectoryOutput,
String pathDirectorySaved,
Iterable<String> pathsFileToCompare)
Executes a task on a single-input.
|
public ExecuteTaskHelper()
TaskArguments
.public ExecuteTaskHelper(boolean copyNonIdentical)
TaskArguments
.copyNonIdentical
- when true, and two files are not identical, the version in the output
directory is copied into the resources directory.public ExecuteTaskHelper(Optional<String> specificOutput, TaskArguments taskArguments, boolean copyNonIdentical)
specificOutput
- when defined, only this outputs are permitted to occur. Otherwise, all
outputs occur as per defaults in the task.taskArguments
- the arguments to use when executing the task.copyNonIdentical
- when true, and two files are not identical, the version in the output
directory is copied into the resources directory.public <T extends InputFromManager,S,V extends Task<T,S>> void assertExpectedTaskOutputs(T input, V task, Path pathDirectoryOutput, String pathDirectorySaved, Iterable<String> pathsFileToCompare) throws OperationFailedException
Expected outputs exist in a resources directory, and the produced outputs are compared against them, to check that they are identical.
T
- input typeS
- shared-state typeV
- task typeinput
- the input for the task.task
- the task to run.pathDirectoryOutput
- an absolute path to a directory where outputs of the task will be
placed.pathDirectorySaved
- a path (relative to the src/test/resources
) to a directory
of saved-results to compare with.pathsFileToCompare
- paths (relative to the src/test/resources
) to check that
are identical.OperationFailedException
- if anything goes wrong.public <T extends InputFromManager,S,V extends Task<T,S>> void assertExpectedTaskOutputs(List<T> inputs, V task, Path pathDirectoryOutput, String pathDirectorySaved, Iterable<String> pathsFileToCompare) throws OperationFailedException
Expected outputs exist in a resources directory, and the produced outputs are compared against them, to check that they are identical.
T
- input typeS
- shared-state typeV
- task typeinputs
- the inputs for the task.task
- the task to run.pathDirectoryOutput
- an absolute path to a directory where outputs of the task will be
placed.pathDirectorySaved
- a path (relative to the src/test/resources
) to a directory
of saved-results to compare with.pathsFileToCompare
- paths (relative to the src/test/resources
) to check that
are identical.OperationFailedException
- if anything goes wrong.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.