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

io.cucumber.junit.LiteralExpression Maven / Gradle / Ivy

There is a newer version: 4.2.8
Show newest version
package io.cucumber.junit;

import io.cucumber.tagexpressions.Expression;

import java.util.List;

public class LiteralExpression implements Expression {

    private final String value;

    LiteralExpression(String value) {
        this.value = value;
    }

    public boolean evaluate(List variables) {
        return variables.contains(this.value);
    }

    public String toString() {
        return this.value.replaceAll("\\(", "\\\\(").replaceAll("\\)", "\\\\)");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy