Class ReplacementAspect


  • public final class ReplacementAspect
    extends Object
    Aspect to replace variables used in the feature files
    Author:
    Jose Fernandez
    • Constructor Detail

      • ReplacementAspect

        public ReplacementAspect()
    • Method Detail

      • getInterpolator

        public static org.apache.commons.text.StringSubstitutor getInterpolator()
      • replacementArguments

        protected void replacementArguments​(io.cucumber.core.backend.TestCaseState state)
      • replacePlaceholders

        public static String replacePlaceholders​(String element,
                                                 boolean setEnableUndefinedVariableException)
                                          throws NonReplaceableException
        Replaces every placeholder element, enclosed in ${} with the corresponding value
        Parameters:
        element - element to be replaced
        setEnableUndefinedVariableException - whether an exception should be thrown is a variable could not be replaced
        Returns:
        String
        Throws:
        NonReplaceableException - exception