summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-08-25 04:43:08 (EDT)
committerEike Stepper2006-08-25 04:43:08 (EDT)
commit420b6a7b87bf2bc8a492ad0c62d191da2a902b03 (patch)
tree642da513cc186973a9b4af668d9371240e7c384b
parentab3d405021c3dbaf9ed71f801a0c2dcff26b520e (diff)
downloadcdo-420b6a7b87bf2bc8a492ad0c62d191da2a902b03.zip
cdo-420b6a7b87bf2bc8a492ad0c62d191da2a902b03.tar.gz
cdo-420b6a7b87bf2bc8a492ad0c62d191da2a902b03.tar.bz2
[151560] Query Language for CDO
https://bugs.eclipse.org/bugs/show_bug.cgi?id=151560
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java30
1 files changed, 26 insertions, 4 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
index 16851f1..a7508d8 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllSuites.java
@@ -11,8 +11,10 @@
package org.eclipse.emf.cdo.tests;
+import org.eclipse.emf.cdo.tests.topology.AbstractTopologyTest;
import org.eclipse.emf.cdo.tests.topology.ITopologyConstants;
-import org.eclipse.emf.cdo.tests.topology.TopologySuite;
+
+import java.util.Enumeration;
import junit.framework.Test;
import junit.framework.TestSuite;
@@ -45,20 +47,40 @@ public class AllSuites extends TestSuite
protected void populateSuite()
{
- for (String mode : ITopologyConstants.ALL_SELF_CONTAINED_MODES)
+ for (String mode : ITopologyConstants.SELF_CONTAINED_MODES)
{
- TopologySuite topologySuite = new TopologySuite(mode);
+ TestSuite topologySuite = new TestSuite("Mode " + mode);
Test[] suites = createPackageSuites();
for (int i = 0; i < suites.length; i++)
{
topologySuite.addTest(suites[i]);
}
+ recursivelySetMode(topologySuite, mode);
addTest(topologySuite);
}
}
- protected Test[] createPackageSuites()
+ private void recursivelySetMode(Test test, String mode)
+ {
+ if (test instanceof AbstractTopologyTest)
+ {
+ AbstractTopologyTest topologyTest = (AbstractTopologyTest) test;
+ topologyTest.setMode(mode);
+ }
+ else if (test instanceof TestSuite)
+ {
+ TestSuite suite = (TestSuite) test;
+ Enumeration enumeration = suite.tests();
+ while (enumeration.hasMoreElements())
+ {
+ Test child = (Test) enumeration.nextElement();
+ recursivelySetMode(child, mode);
+ }
+ }
+ }
+
+ private Test[] createPackageSuites()
{
return new Test[] { //
org.eclipse.emf.cdo.tests.model1.AllTests.suite() //