@Component
public class ModifyStepDefinitions
extends java.lang.Object
Constructor and Description |
---|
ModifyStepDefinitions() |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String alias,
java.lang.String addAlias,
java.lang.String add)
Add two aliases
|
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 |
divide(java.lang.String alias,
java.lang.String divideAlias,
java.lang.String divide)
Divide two aliases
|
void |
lowercase(java.lang.String alias)
Transforms the alias to an lower case value
|
void |
max(java.lang.String alias,
java.lang.String maxValueAlias,
java.lang.String maxValue)
Set an alias to the maximum value
|
void |
min(java.lang.String alias,
java.lang.String minValueAlias,
java.lang.String minValue)
Set an alias to the minimum value
|
void |
multiply(java.lang.String alias,
java.lang.String multiplyAlias,
java.lang.String multiply)
Multiply two aliases
|
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 |
subtract(java.lang.String alias,
java.lang.String subtractAlias,
java.lang.String subtract)
Subtract two aliases
|
void |
trimAlias(java.lang.String alias)
Trims the string referenced by the alias
|
void |
uppercase(java.lang.String alias)
Transforms the alias to an upper case value
|
@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 modify(?: the)? alias \"(.*?)\" by converting it to upper case$") public void uppercase(java.lang.String alias)
alias
- The text to append the aliased value with@Then(value="^I modify(?: the)? alias \"(.*?)\" by converting it to lower case") public void lowercase(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@Then(value="^I modify(?: the)? alias \"(.*?)\" by subtracting( alias)? \"(.*?)\" from it") public void subtract(java.lang.String alias, java.lang.String subtractAlias, java.lang.String subtract)
alias
- The alias that holds the first valuesubtractAlias
- include the word alias to get the value of the subtraction from an aliased valuesubtract
- The alias or value that is to be subtracted from the first value@Then(value="^I modify(?: the)? alias \"(.*?)\" by adding( alias)? \"(.*?)\" to it") public void add(java.lang.String alias, java.lang.String addAlias, java.lang.String add)
alias
- The alias that holds the first valueaddAlias
- include the word alias to get the value of the addition from an aliased valueadd
- The alias that holds the value to add to the first value@Then(value="^I modify(?: the)? alias \"(.*?)\" by multiplying( alias)? \"(.*?)\" with it") public void multiply(java.lang.String alias, java.lang.String multiplyAlias, java.lang.String multiply)
alias
- The alias that holds the first valuemultiplyAlias
- include the word alias to get the value of the multiplier from an aliased valuemultiply
- The alias that holds the value to multiply with the first value@Then(value="^I modify(?: the)? alias \"(.*?)\" by dividing( alias)? \"(.*?)\" into it") public void divide(java.lang.String alias, java.lang.String divideAlias, java.lang.String divide)
alias
- The alias that holds the first valuedivideAlias
- include the word alias to get the value of the divisor from an aliased valuedivide
- The alias that holds the value to divide with the first value@Then(value="^I modify(?: the)? alias \"(.*?)\" by setting it to( alias)? \"(.*?)\" if the value it holds is smaller") public void max(java.lang.String alias, java.lang.String maxValueAlias, java.lang.String maxValue)
alias
- The alias that holds the first valuemaxValueAlias
- include the word alias to get the value of the max value from an aliased valuemaxValue
- The value@Then(value="^I modify(?: the)? alias \"(.*?)\" by setting it to( alias)? \"(.*?)\" if the value it holds is larger") public void min(java.lang.String alias, java.lang.String minValueAlias, java.lang.String minValue)
alias
- The alias that holds the first valueminValueAlias
- include the word alias to get the value of the max value from an aliased valueminValue
- The value