public final class VariableUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
cutOffDoubleQuotes(String variable)
Cut off double quotes prefix and suffix.
|
static String |
cutOffSingleQuotes(String variable)
Cut off single quotes prefix and suffix.
|
static String |
cutOffVariablesEscaping(String variable)
Cut off variables escaping
|
static String |
cutOffVariablesPrefix(String variable)
Cut off variables prefix
|
static String |
getValueFromScript(String scriptEngine,
String code)
Evaluates script code and returns a variable value as result.
|
static boolean |
isVariableName(String expression)
Checks whether a given expression is a variable name.
|
static String |
replaceVariablesInString(String str,
TestContext context,
boolean enableQuoting)
Replace all variable expression in a string with
its respective value.
|
public static String getValueFromScript(String scriptEngine, String code)
scriptEngine
- the name of the scripting engine.code
- the script code.public static String cutOffSingleQuotes(String variable)
variable
- public static String cutOffDoubleQuotes(String variable)
variable
- public static String cutOffVariablesPrefix(String variable)
variable
- public static String cutOffVariablesEscaping(String variable)
variable
- public static boolean isVariableName(String expression)
expression
- public static String replaceVariablesInString(String str, TestContext context, boolean enableQuoting)
str
- context
- enableQuoting
- Copyright © 2008–2017 ConSol Software GmbH. All rights reserved.