summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-08-25 04:45:15 (EDT)
committerEike Stepper2006-08-25 04:45:15 (EDT)
commit022a781d60b1daacda0dfac648514a5c0adc8e80 (patch)
tree9a0ba6f28ad128ca99605ed7e7070bf471cf682f
parent420b6a7b87bf2bc8a492ad0c62d191da2a902b03 (diff)
downloadcdo-022a781d60b1daacda0dfac648514a5c0adc8e80.zip
cdo-022a781d60b1daacda0dfac648514a5c0adc8e80.tar.gz
cdo-022a781d60b1daacda0dfac648514a5c0adc8e80.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.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AdapterTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/OCLTest.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java40
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/TopologySuite.java31
6 files changed, 31 insertions, 49 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 a7508d8..d82b134 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
@@ -61,7 +61,7 @@ public class AllSuites extends TestSuite
}
}
- private void recursivelySetMode(Test test, String mode)
+ protected void recursivelySetMode(Test test, String mode)
{
if (test instanceof AbstractTopologyTest)
{
@@ -80,7 +80,7 @@ public class AllSuites extends TestSuite
}
}
- private Test[] createPackageSuites()
+ protected Test[] createPackageSuites()
{
return new Test[] { //
org.eclipse.emf.cdo.tests.model1.AllTests.suite() //
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AdapterTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AdapterTest.java
index 7900b70..249375d 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AdapterTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/AdapterTest.java
@@ -22,8 +22,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.net4j.util.PropertiesHelper;
-
import testmodel1.TreeNode;
import java.util.Iterator;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/OCLTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/OCLTest.java
index 5f701ee..afb0ff9 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/OCLTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/model1/OCLTest.java
@@ -13,7 +13,6 @@ package org.eclipse.emf.cdo.tests.model1;
import org.eclipse.emf.cdo.client.ocl.CDOHelperUtil;
-import org.eclipse.emf.ocl.helper.HelperUtil;
import org.eclipse.emf.ocl.helper.IOCLHelper;
import org.eclipse.emf.ocl.helper.OCLParsingException;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
index d7f2ff9..755f8eb 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/AbstractTopologyTest.java
@@ -31,12 +31,34 @@ import junit.framework.TestCase;
public abstract class AbstractTopologyTest extends TestCase implements ITopologyConstants
{
+ private String mode;
+
private ITopology topology;
+ public String getMode()
+ {
+ return mode;
+ }
+
+ public void setMode(String mode)
+ {
+ this.mode = mode;
+ }
+
+ public ITopology getTopology()
+ {
+ return topology;
+ }
+
+ public void setTopology(ITopology topology)
+ {
+ this.topology = topology;
+ }
+
@Override
protected void setUp() throws Exception
{
- topology = createTopology();
+ if (topology == null) topology = createTopology();
System.out.println("=========================================================================");
System.out.println("TC_START " + getName() + " [" + topology.getName() + "]");
System.out.println("=========================================================================");
@@ -86,11 +108,6 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
}
}
- protected ITopology getTopology()
- {
- return topology;
- }
-
protected DataSource getDataSource()
{
return topology.getDataSource();
@@ -142,7 +159,11 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
protected ITopology createTopology()
{
- String mode = getMode();
+ if (mode == null)
+ {
+ mode = System.getProperty(CDO_TEST_MODE_KEY, DEFAULT_MODE);
+ }
+
if (EMBEDDED_MODE.equalsIgnoreCase(mode))
{
return new EmbeddedTopology();
@@ -167,11 +188,6 @@ public abstract class AbstractTopologyTest extends TestCase implements ITopology
return null; // Make compiler happy
}
- protected String getMode()
- {
- return System.getProperty(CDO_TEST_MODE_KEY, DEFAULT_MODE);
- }
-
protected void assertTrue(Object object)
{
assertNotNull(object);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java
index c086f2b..47fd7bc 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/ITopologyConstants.java
@@ -30,7 +30,7 @@ public interface ITopologyConstants
EMBEDDED_MODE // 3
};
- public static final String[] ALL_SELF_CONTAINED_MODES = { //
+ public static final String[] SELF_CONTAINED_MODES = { //
CLIENT_SEPARATED_SERVER_MODE, // 0
CLIENT_SERVER_MODE, // 1
EMBEDDED_MODE // 2
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/TopologySuite.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/TopologySuite.java
deleted file mode 100644
index 17ca272..0000000
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/topology/TopologySuite.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.eclipse.emf.cdo.tests.topology;
-
-
-import junit.framework.Assert;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-
-
-public class TopologySuite extends TestSuite implements ITopologyConstants
-{
- private String mode = DEFAULT_MODE;
-
- public TopologySuite(String mode)
- {
- super("Mode " + mode);
- this.mode = mode;
- }
-
- public String getMode()
- {
- return mode;
- }
-
- @Override
- public void run(TestResult result)
- {
- Assert.assertNotNull(mode);
- System.setProperty(CDO_TEST_MODE_KEY, mode);
- super.run(result);
- }
-}