Class EvalTestCase.Builder

java.lang.Object
dev.dokimos.core.EvalTestCase.Builder
Enclosing class:
EvalTestCase

public static class EvalTestCase.Builder extends Object
Builder for constructing test cases with multiple inputs and outputs.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • input

      public EvalTestCase.Builder input(String key, Object value)
      Adds an input with the given key and value.
      Parameters:
      key - the input key
      value - the input value
      Returns:
      this builder
    • actualOutput

      public EvalTestCase.Builder actualOutput(String key, Object value)
      Adds an actual output with the given key and value.
      Parameters:
      key - the output key
      value - the output value
      Returns:
      this builder
    • expectedOutput

      public EvalTestCase.Builder expectedOutput(String key, Object value)
      Adds an expected output with the given key and value.
      Parameters:
      key - the output key
      value - the output value
      Returns:
      this builder
    • metadata

      public EvalTestCase.Builder metadata(String key, Object value)
      Adds metadata with the given key and value.
      Parameters:
      key - the metadata key
      value - the metadata value
      Returns:
      this builder
    • input

      public EvalTestCase.Builder input(String value)
      Sets the primary input value.
      Parameters:
      value - the input value
      Returns:
      this builder
    • actualOutput

      public EvalTestCase.Builder actualOutput(String value)
      Sets the primary actual output value.
      Parameters:
      value - the actual output value
      Returns:
      this builder
    • expectedOutput

      public EvalTestCase.Builder expectedOutput(String value)
      Sets the primary expected output value.
      Parameters:
      value - the expected output value
      Returns:
      this builder
    • inputs

      public EvalTestCase.Builder inputs(Map<String,Object> inputs)
      Adds all entries from the given inputs map.
      Parameters:
      inputs - the inputs to add
      Returns:
      this builder
    • actualOutputs

      public EvalTestCase.Builder actualOutputs(Map<String,Object> actualOutputs)
      Adds all entries from the given actual outputs map.
      Parameters:
      actualOutputs - the actual outputs to add
      Returns:
      this builder
    • expectedOutputs

      public EvalTestCase.Builder expectedOutputs(Map<String,Object> expectedOutputs)
      Adds all entries from the given expected outputs map.
      Parameters:
      expectedOutputs - the expected outputs to add
      Returns:
      this builder
    • metadata

      public EvalTestCase.Builder metadata(Map<String,Object> metadata)
      Adds all entries from the given metadata map.
      Parameters:
      metadata - the metadata to add
      Returns:
      this builder
    • build

      public EvalTestCase build()
      Builds the test case.
      Returns:
      a new test case