use of org.eclipse.core.internal.variables.ValueVariable in project jbosstools-server by jbosstools.
the class StringSubstitutionTest method testSetVariable.
public void testSetVariable() {
try {
IValueVariable[] variables = new IValueVariable[] { new ValueVariable("test_variable", null, false, "/here") };
VariablesPlugin.getDefault().getStringVariableManager().addVariables(variables);
WorkspaceVFS vfs = (WorkspaceVFS) ArchivesCore.getInstance().getVFS();
String out = vfs.performStringSubstitution("${test_variable}", null, true);
assertEquals("/here", out);
VariablesPlugin.getDefault().getStringVariableManager().removeVariables(variables);
} catch (CoreException ce) {
fail(ce.getMessage());
}
}
Aggregations