Package dev.dokimos.core
Class EvalTestCase.Builder
java.lang.Object
dev.dokimos.core.EvalTestCase.Builder
- Enclosing class:
EvalTestCase
Builder for constructing test cases with multiple inputs and outputs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactualOutput(String value) Sets the primary actual output value.actualOutput(String key, Object value) Adds an actual output with the given key and value.actualOutputs(Map<String, Object> actualOutputs) Adds all entries from the given actual outputs map.build()Builds the test case.expectedOutput(String value) Sets the primary expected output value.expectedOutput(String key, Object value) Adds an expected output with the given key and value.expectedOutputs(Map<String, Object> expectedOutputs) Adds all entries from the given expected outputs map.Sets the primary input value.Adds an input with the given key and value.Adds all entries from the given inputs map.Adds metadata with the given key and value.Adds all entries from the given metadata map.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
input
Adds an input with the given key and value.- Parameters:
key- the input keyvalue- the input value- Returns:
- this builder
-
actualOutput
Adds an actual output with the given key and value.- Parameters:
key- the output keyvalue- the output value- Returns:
- this builder
-
expectedOutput
Adds an expected output with the given key and value.- Parameters:
key- the output keyvalue- the output value- Returns:
- this builder
-
metadata
Adds metadata with the given key and value.- Parameters:
key- the metadata keyvalue- the metadata value- Returns:
- this builder
-
input
Sets the primary input value.- Parameters:
value- the input value- Returns:
- this builder
-
actualOutput
Sets the primary actual output value.- Parameters:
value- the actual output value- Returns:
- this builder
-
expectedOutput
Sets the primary expected output value.- Parameters:
value- the expected output value- Returns:
- this builder
-
inputs
Adds all entries from the given inputs map.- Parameters:
inputs- the inputs to add- Returns:
- this builder
-
actualOutputs
Adds all entries from the given actual outputs map.- Parameters:
actualOutputs- the actual outputs to add- Returns:
- this builder
-
expectedOutputs
Adds all entries from the given expected outputs map.- Parameters:
expectedOutputs- the expected outputs to add- Returns:
- this builder
-
metadata
Adds all entries from the given metadata map.- Parameters:
metadata- the metadata to add- Returns:
- this builder
-
build
Builds the test case.- Returns:
- a new test case
-