All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.mehtrick.bjoern.parser.validator.validations.BjoernKeywords Maven / Gradle / Ivy

There is a newer version: 1.2.6
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy