Class Generator

java.lang.Object
org.camunda.community.bpmndt.Generator

public class Generator extends Object
Class that is responsible for generating test code and writing the generated files to the test source directory.
  • Constructor Details

    • Generator

      public Generator()
  • Method Details

    • toJavaLiteral

      public static String toJavaLiteral(String id)
      Converts the given BPMN element ID into a Java literal, which can be used when generating source code. The conversion lowers all characters and retains letters as well as digits. All other characters are converted into underscores. If the literal starts with a digit, an additional underscore is prepended.
      Parameters:
      id - The ID of a specific flow node or process.
      Returns:
      A Java conform literal.
    • toLiteral

      public static String toLiteral(String id)
      Converts the given BPMN element ID into a literal, which can be used when generating source code. The conversion retains letters and digits. All other characters are converted into underscores. Moreover, upper case is also retained.
      Parameters:
      id - The ID of a specific flow node or process.
      Returns:
      A conform literal.
    • generate

      public void generate(GeneratorContext ctx)
    • generateMultiInstanceHandlers

      protected void generateMultiInstanceHandlers(TestCaseContext ctx)
    • generateMultiInstanceScopeHandlers

      protected void generateMultiInstanceScopeHandlers(TestCaseContext ctx)
    • generateSpringConfiguration

      protected void generateSpringConfiguration(GeneratorContext ctx)
    • generateTestCases

      protected void generateTestCases(GeneratorContext gCtx, Path bpmnFile)
    • generateTestCases

      protected void generateTestCases(GeneratorContext gCtx, Path bpmnFile, List<TestCase> testCases)
    • getResult

      public GeneratorResult getResult()