Class RbelBuilderGlueCode

java.lang.Object
de.gematik.test.tiger.glue.RbelBuilderGlueCode

public class RbelBuilderGlueCode extends Object
  • Constructor Details

    • RbelBuilderGlueCode

      public RbelBuilderGlueCode()
  • Method Details

    • createFromContent

      @Gegebensei("TGR erstellt ein neues Rbel-Objekt {string} mit Inhalt {string}") @Given("TGR creates a new Rbel object {string} with content {string}") public void createFromContent(String name, String content)
      Creates a new Rbel object with a given key and string content; the string can be a jexl expression
      Parameters:
      name - key of Rbel object
      content - content of Rbel object, or jexl expression resolving to one
    • createFromScratch

      @Gegebensei("TGR erstellt ein neues leeres Rbel-Objekt {string} mit Typ {rbelContentType}") @Given("TGR creates a new empty Rbel object {string} of type {rbelContentType}") public void createFromScratch(String name, de.gematik.rbellogger.writer.RbelContentType type)
      Creates a new empty Rbel object
      Parameters:
      name - key of Rbel object
    • setValueAt

      @Wenn("TGR setzt Rbel-Objekt {string} an Stelle {string} auf Wert {string}") @When("TGR sets Rbel object {string} at {string} to new value {string}") public void setValueAt(String objectName, String rbelPath, String newValue)
      Sets a value of an object at a specified path; newValue is of type String
      Parameters:
      objectName - name of object in rbelBuilders
      rbelPath - path which is to be set
      newValue - new value to be set
    • addEntryAt

      @Wenn("TGR erg\u00e4nzt Rbel-Objekt {string} an Stelle {string} um {string}") @When("TGR extends Rbel object {string} at path {string} by a new entry {string}") public void addEntryAt(String objectName, String rbelPath, String newEntry)
      Adds a new entry to an array or a list of a Rbel object at a specific path
      Parameters:
      objectName - name of Rbel object
      rbelPath - path of array/list
      newEntry - new entry
    • assertValueAtEquals

      @Wenn("TGR pr\u00fcft, dass Rbel-Objekt {string} an Stelle {string} gleich {string} ist") @When("TGR asserts Rbel object {string} at {string} equals {string}") public void assertValueAtEquals(String objectName, String rbelPath, String expectedValue)
      Asserts whether a string value at a given path of the rootTreeNode of a RbelBuilder is a certain value
      Parameters:
      objectName - name of RbelBuilder in rbelBuilders Map
      rbelPath - Path to specific node
      expectedValue - value to be asserted
    • assertJexlOutputEquals

      @Wenn("TGR pr\u00fcft, dass {string} gleich {string} mit Typ {rbelContentType} ist") @When("TGR asserts {string} equals {string} of type {rbelContentType}") public void assertJexlOutputEquals(String jexlExpressionActual, String jexlExpressionExpected, de.gematik.rbellogger.writer.RbelContentType contentType)
      Asserts, if 2 Rbel object serializations are equal
      Parameters:
      jexlExpressionActual - actual value
      jexlExpressionExpected - expected value
      contentType - type of Rbel object content for comparison
    • rbelContentType

      public de.gematik.rbellogger.writer.RbelContentType rbelContentType(String value)
      replaces String values with its enum value in RbelContentType
      Parameters:
      value - string value in enum
      Returns:
      Enum value