Package de.qytera.qtaf.cucumber.helper
Class CucumberTagHelper
java.lang.Object
de.qytera.qtaf.cucumber.helper.CucumberTagHelper
Class that provides helper methods for extracting information from cucumber tags
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MatcherExtract hey and value from a stringgetKeyValueListPairs(List<String> tags) Get a key-value-list pairs from a list of cucumber tag stringsgetKeyValuePairs(List<String> tags) Get a list of key-value pairs from a list of cucumber tag stringsgetKeyValuePairsFromTagList(List<io.cucumber.messages.types.Tag> tags) Get a list of key-value pairs from a list of cucumber tag objectsstatic StringFind the tag that represents the test ID and extracts the test IDstatic booleanCheck if a given string is a key-value-pair (matches keyValueRegex)static booleanCheck if a given string is a tag
-
Constructor Details
-
CucumberTagHelper
public CucumberTagHelper()
-
-
Method Details
-
isKeyValuePair
Check if a given string is a key-value-pair (matches keyValueRegex)- Parameters:
s- string- Returns:
- true if string is a key-value-pair, false otherwise
-
isTag
Check if a given string is a tag- Parameters:
s- string- Returns:
- true if string is a tag
-
getKeyAndValueMatch
Extract hey and value from a string- Parameters:
s- string- Returns:
- Matcher object
-
getKeyValuePairsFromTagList
public static Map<String,String> getKeyValuePairsFromTagList(List<io.cucumber.messages.types.Tag> tags) Get a list of key-value pairs from a list of cucumber tag objects- Parameters:
tags- List of cucumber tag objects- Returns:
- Map of key-value-pairs
-
getKeyValuePairs
Get a list of key-value pairs from a list of cucumber tag strings- Parameters:
tags- List of cucumber tag strings- Returns:
- Map of key-value-pairs
-
getKeyValueListPairs
Get a key-value-list pairs from a list of cucumber tag strings- Parameters:
tags- List of cucumber tag strings- Returns:
- Map of key-value-lists
-
getTestId
Find the tag that represents the test ID and extracts the test ID- Parameters:
tags- List of cucumber tags- Returns:
- test ID
-