@Component
public class ModifyStepDefinitions
extends java.lang.Object
| Constructor and Description |
|---|
ModifyStepDefinitions() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendAlias(java.lang.String alias,
java.lang.String valueAlias,
java.lang.String append)
Modify an aliased value by appending it with a string.
|
void |
copyAlias(java.lang.String source,
java.lang.String destination)
Copy an alias
|
void |
prependAlias(java.lang.String alias,
java.lang.String valueAlias,
java.lang.String prepend)
Modify an aliased value by prepending it with a string.
|
void |
removeCharsInAlias(java.lang.String alias,
java.lang.String regex)
Modify an aliased value.
|
void |
replaceCharsInAlias(java.lang.String alias,
java.lang.String regex,
java.lang.String replacement)
Modify an aliased value by replacing any matched characters.
|
void |
replaceFirstCharsInAlias(java.lang.String alias,
java.lang.String regex,
java.lang.String replacement)
Modify an aliased value by replacing the first matched characters.
|
void |
saveDateToAlias(java.lang.String offsetAlias,
java.lang.String offsetAmount,
java.lang.String format,
java.lang.String alias)
Save the current date and time to an aliased value.
|
void |
trimAlias(java.lang.String alias)
Trims the string referenced by the alias
|
@Then(value="^I modify(?: the)? alias \"(.*?)\" by removing all characters that match the regex \"(.*?)\"$")
public void removeCharsInAlias(java.lang.String alias,
java.lang.String regex)
alias - The alias to modifyregex - The regex to match@Then(value="^I modify(?: the)? alias \"(.*?)\" by replacing all characters that match the regex \"(.*?)\" with \"(.*?)\"$")
public void replaceCharsInAlias(java.lang.String alias,
java.lang.String regex,
java.lang.String replacement)
alias - The alias to modifyregex - The regex to matchreplacement - The text to replace any matched string with@Then(value="^I modify(?: the)? alias \"(.*?)\" by replacing the first characters that match the regex \"(.*?)\" with \"(.*?)\"$")
public void replaceFirstCharsInAlias(java.lang.String alias,
java.lang.String regex,
java.lang.String replacement)
alias - The alias to modifyregex - The regex to matchreplacement - The text to replace the first matched string with@Then(value="^I modify(?: the)? alias \"(.*?)\" by prepending it with( alias)? \"(.*?)\"$")
public void prependAlias(java.lang.String alias,
java.lang.String valueAlias,
java.lang.String prepend)
alias - The alias to modifyvalueAlias - Set this text to get the value to be prepended from an existing aliasprepend - The text to prepend the aliased value with@Then(value="^I modify(?: the)? alias \"(.*?)\" by appending it with( alias)? \"(.*?)\"$")
public void appendAlias(java.lang.String alias,
java.lang.String valueAlias,
java.lang.String append)
alias - The alias to modifyvalueAlias - Set this text to get the value to be appended from an existing aliasappend - The text to append the aliased value with@Then(value="^I modify(?: the)? alias \"(.*?)\" by trimming it$") public void trimAlias(java.lang.String alias)
alias - The text to append the aliased value with@Then(value="^I copy(?: the)? alias \"(.*?)\" to(?: the)? alias \"(.*?)\"$")
public void copyAlias(java.lang.String source,
java.lang.String destination)
source - The source aliasdestination - The destination alias@When(value="^I save the current date(?: offset by( alias)? \"(.*?)\")? with the format \"(.*?)\" to(?: the)? alias \"(.*?)\"")
public void saveDateToAlias(java.lang.String offsetAlias,
java.lang.String offsetAmount,
java.lang.String format,
java.lang.String alias)
format - The format of the date: https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.htmloffsetAlias - include the word alias to get the value of the offset from an aliased valueoffsetAmount - The optional amount to offset todays date by e.g. "1 day" or "2 weeks"alias - The alias to save the date into