summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-18 11:39:40 (EDT)
committerCarsten Drossel2008-08-18 11:39:40 (EDT)
commit0860522ffd91436430479a0569b7e994a5f27fc0 (patch)
treef4e7d1ab497073addeab6fe2e37f2606be6889c3
parent838dbd49613ab31fcd931cbb3c0a2c7c17dc8226 (diff)
downloadorg.eclipse.riena-0860522ffd91436430479a0569b7e994a5f27fc0.zip
org.eclipse.riena-0860522ffd91436430479a0569b7e994a5f27fc0.tar.gz
org.eclipse.riena-0860522ffd91436430479a0569b7e994a5f27fc0.tar.bz2
fixed tests to run with a JRE 6 which depended on Strings built depending on the order of elements in a Set
-rw-r--r--org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java b/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java
index d36046d..d620d4b 100644
--- a/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java
+++ b/org.eclipse.riena.tests/src/org/eclipse/riena/core/util/VariableManagerUtilTest.java
@@ -14,7 +14,6 @@ import java.lang.reflect.Field;
import org.eclipse.core.internal.variables.StringVariableManager;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.riena.core.util.VariableManagerUtil;
import org.eclipse.riena.tests.RienaTestCase;
/**
@@ -69,7 +68,10 @@ public class VariableManagerUtilTest extends RienaTestCase {
VariableManagerUtil.substitute("${a}");
fail();
} catch (CoreException e) {
- assertTrue(e.getMessage().contains("a, b"));
+ String problemVariableList = e.getMessage().substring(e.getMessage().indexOf(",") - 1,
+ e.getMessage().indexOf(",") + 3);
+ assertTrue(problemVariableList.contains("a"));
+ assertTrue(problemVariableList.contains("b"));
}
}
@@ -81,7 +83,11 @@ public class VariableManagerUtilTest extends RienaTestCase {
VariableManagerUtil.substitute("${a}");
fail();
} catch (CoreException e) {
- assertTrue(e.getMessage().contains("a, c, b"));
+ String problemVariableList = e.getMessage().substring(e.getMessage().indexOf(",") - 1,
+ e.getMessage().indexOf(",") + 6);
+ assertTrue(problemVariableList.contains("a"));
+ assertTrue(problemVariableList.contains("b"));
+ assertTrue(problemVariableList.contains("c"));
}
}