Package de.gematik.test.tiger.glue
Class RbelBuilderGlueCode
java.lang.Object
de.gematik.test.tiger.glue.RbelBuilderGlueCode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntryAt(String objectName, String rbelPath, String newEntry) Adds a new entry to an array or a list of a Rbel object at a specific pathvoidassertJexlOutputEquals(String jexlExpressionActual, String jexlExpressionExpected, de.gematik.rbellogger.writer.RbelContentType contentType) Asserts, if 2 Rbel object serializations are equalvoidassertValueAtEquals(String objectName, String rbelPath, String expectedValue) Asserts whether a string value at a given path of the rootTreeNode of a RbelBuilder is a certain valuevoidcreateFromContent(String name, String content) Creates a new Rbel object with a given key and string content; the string can be a jexl expressionvoidcreateFromScratch(String name, de.gematik.rbellogger.writer.RbelContentType type) Creates a new empty Rbel objectde.gematik.rbellogger.writer.RbelContentTyperbelContentType(String value) replaces String values with its enum value inRbelContentTypevoidsetValueAt(String objectName, String rbelPath, String newValue) Sets a value of an object at a specified path; newValue is of type String
-
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 objectcontent- 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 rbelBuildersrbelPath- path which is to be setnewValue- 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 objectrbelPath- path of array/listnewEntry- 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 MaprbelPath- Path to specific nodeexpectedValue- 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 valuejexlExpressionExpected- expected valuecontentType- type of Rbel object content for comparison
-
rbelContentType
replaces String values with its enum value inRbelContentType- Parameters:
value- string value in enum- Returns:
- Enum value
-