de.mehtrick.bjoern.parser.validator.validations.BjoernKeywords Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bjoern-parser Show documentation
Show all versions of bjoern-parser Show documentation
Simple bdd-java-framework for universal unit testing
package de.mehtrick.bjoern.parser.validator.validations;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
public enum BjoernKeywords {
GIVEN("Given:"), WHEN("When:"), THEN("Then:"), BACKGROUND("Background:"), FEATURE("Feature:"), SCENARIO("- Scenario:"), SCENARIOS("Scenarios:"), STATEMENT("-");
public String keyword;
BjoernKeywords(String keyword) {
this.keyword = keyword;
}
public static List getKeywordValues() {
return Arrays.stream(BjoernKeywords.values()).map(k -> k.keyword).collect(Collectors.toList());
}
public static String getKeywordsAsSingleString() {
return BjoernKeywords.getKeywordValues().stream().collect(Collectors.joining(","));
}
@Override
public String toString() {
return keyword;
}
}