Interface TestCases


public interface TestCases
Test cases of a BPMN model.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Gets all test cases of all processes that are defined in the BPMN model.
    get(String processId)
    Gets the test cases of the process with the given ID.
    org.camunda.bpm.model.bpmn.BpmnModelInstance
    Returns the underlying BPMN model instance.
    Gets the IDs of all processes that are defined in the BPMN model.
    boolean
    Determines if the BPMN model does not define test cases.
    static TestCases
    of(InputStream stream)
    Reads test cases from the given input stream.
    static TestCases
    of(Path bpmnFile)
    Reads test cases from the BPMN file with the given path.
    static TestCases
    of(org.camunda.bpm.model.bpmn.BpmnModelInstance modelInstance)
    Gets the test cases of the given BPMN model instance.
  • Method Details

    • of

      static TestCases of(InputStream stream)
      Reads test cases from the given input stream. A runtime exception is thrown, when the BPMN model could not be parsed.
      Parameters:
      stream - A stream to read from.
      Returns:
      The test cases.
    • of

      static TestCases of(org.camunda.bpm.model.bpmn.BpmnModelInstance modelInstance)
      Gets the test cases of the given BPMN model instance.
      Parameters:
      modelInstance - A model instance with or without "bpmndt:testCases" extension elements.
      Returns:
      The test cases.
    • of

      static TestCases of(Path bpmnFile)
      Reads test cases from the BPMN file with the given path. A runtime exception is thrown, when the file could not be found or read or the BPMN model could not be parsed.
      Parameters:
      bpmnFile - A readable BPMN file.
      Returns:
      The test cases.
    • get

      List<TestCase> get()
      Gets all test cases of all processes that are defined in the BPMN model.
      Returns:
      A list, containing all test cases.
    • get

      List<TestCase> get(String processId)
      Gets the test cases of the process with the given ID.
      Parameters:
      processId - A specific process ID.
      Returns:
      The test cases of the process or an empty list, if the process has no test cases or does not exist.
    • getModelInstance

      org.camunda.bpm.model.bpmn.BpmnModelInstance getModelInstance()
      Returns the underlying BPMN model instance.
      Returns:
      The BPMN model instance.
    • getProcessIds

      Set<String> getProcessIds()
      Gets the IDs of all processes that are defined in the BPMN model.
      Returns:
      A set, containing all process IDs.
    • isEmpty

      boolean isEmpty()
      Determines if the BPMN model does not define test cases.
      Returns:
      true, if no test cases are defined. Otherwise false.