Author: rob.stryker(a)jboss.com
Date: 2009-04-08 06:28:23 -0400 (Wed, 08 Apr 2009)
New Revision: 14597
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/StringSubstitutionTest.java
Log:
Another unit test blatently using the wrong API
Modified:
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/StringSubstitutionTest.java
===================================================================
---
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/StringSubstitutionTest.java 2009-04-08
10:27:12 UTC (rev 14596)
+++
trunk/archives/tests/org.jboss.ide.eclipse.archives.test/src/org/jboss/ide/eclipse/archives/test/model/StringSubstitutionTest.java 2009-04-08
10:28:23 UTC (rev 14597)
@@ -12,9 +12,12 @@
import junit.framework.TestCase;
+import org.eclipse.core.internal.variables.ValueVariable;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.variables.IValueVariable;
+import org.eclipse.core.variables.VariablesPlugin;
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.model.other.internal.WorkspaceVFS;
@@ -55,11 +58,14 @@
public void testSetVariable() {
try {
- ResourcesPlugin.getWorkspace().getPathVariableManager().setValue("test_variable",
new Path("/here"));
+ 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);
- ResourcesPlugin.getWorkspace().getPathVariableManager().setValue("test_variable",
null);
+ VariablesPlugin.getDefault().getStringVariableManager().removeVariables(variables);
} catch( CoreException ce ) {
fail(ce.getMessage());
}
Show replies by date