summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-05-12 05:41:43 (EDT)
committerEike Stepper2008-05-12 05:41:43 (EDT)
commitecb94ce60f375a45b7a5a8e76f440195717bad95 (patch)
treeb99111e864ec3c601a0ea58fb8b62abe81d27d44
parent00ba22bf1cee6ba0c6fb49dd77c0c54970df748c (diff)
downloadcdo-ecb94ce60f375a45b7a5a8e76f440195717bad95.zip
cdo-ecb94ce60f375a45b7a5a8e76f440195717bad95.tar.gz
cdo-ecb94ce60f375a45b7a5a8e76f440195717bad95.tar.bz2
Added store test framework
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/HSQLDBHorizontalTest.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/DBStoreTestLogic.java (renamed from plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/DBStoreTestLogic.java)2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/HorizontalTestLogic.java (renamed from plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/HorizontalTest.java)32
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/TestLogic.java (renamed from plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/TestLogic.java)2
4 files changed, 35 insertions, 31 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/HSQLDBHorizontalTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/HSQLDBHorizontalTest.java
new file mode 100644
index 0000000..fa8559f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/HSQLDBHorizontalTest.java
@@ -0,0 +1,30 @@
+package org.eclipse.emf.cdo.tests.store;
+
+import org.eclipse.emf.cdo.tests.store.logic.HorizontalTestLogic;
+
+import org.eclipse.net4j.db.IDBConnectionProvider;
+import org.eclipse.net4j.db.hsqldb.HSQLDBDataSource;
+import org.eclipse.net4j.db.internal.hsqldb.HSQLDBAdapter;
+import org.eclipse.net4j.internal.db.DataSourceConnectionProvider;
+
+/**
+ * @author Eike Stepper
+ */
+public final class HSQLDBHorizontalTest extends HorizontalTestLogic
+{
+ @Override
+ protected IDBConnectionProvider createDBConnectionProvider()
+ {
+ HSQLDBDataSource dataSource = new HSQLDBDataSource();
+ dataSource.setDatabase("jdbc:hsqldb:mem:storetest");
+ dataSource.setUser("sa");
+
+ return new DataSourceConnectionProvider(dataSource);
+ }
+
+ @Override
+ protected HSQLDBAdapter createDBAdapter()
+ {
+ return new HSQLDBAdapter();
+ }
+} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/DBStoreTestLogic.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/DBStoreTestLogic.java
index bc9cf44..64a6737 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/DBStoreTestLogic.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/DBStoreTestLogic.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.emf.cdo.tests.store;
+package org.eclipse.emf.cdo.tests.store.logic;
import org.eclipse.emf.cdo.server.IStore;
import org.eclipse.emf.cdo.server.internal.db.CDODBSchema;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/HorizontalTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/HorizontalTestLogic.java
index 39c3441..99ff77c 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/HorizontalTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/HorizontalTestLogic.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.emf.cdo.tests.store;
+package org.eclipse.emf.cdo.tests.store.logic;
import org.eclipse.emf.cdo.internal.server.Transaction;
import org.eclipse.emf.cdo.server.internal.db.HorizontalMappingStrategy;
@@ -16,10 +16,6 @@ import org.eclipse.emf.cdo.server.internal.db.MappingStrategy;
import org.eclipse.emf.cdo.server.internal.db.ToMany;
import org.eclipse.emf.cdo.server.internal.db.ToOne;
-import org.eclipse.net4j.db.IDBConnectionProvider;
-import org.eclipse.net4j.db.hsqldb.HSQLDBDataSource;
-import org.eclipse.net4j.db.internal.hsqldb.HSQLDBAdapter;
-import org.eclipse.net4j.internal.db.DataSourceConnectionProvider;
import java.util.HashMap;
import java.util.Map;
@@ -27,9 +23,9 @@ import java.util.Map;
/**
* @author Eike Stepper
*/
-public abstract class HorizontalTest extends DBStoreTestLogic
+public abstract class HorizontalTestLogic extends DBStoreTestLogic
{
- public HorizontalTest()
+ public HorizontalTestLogic()
{
}
@@ -101,26 +97,4 @@ public abstract class HorizontalTest extends DBStoreTestLogic
// assertFieldValue("Homestr. 17", "select street from Company where cdo_id=1 and cdo_version=1");
// assertFieldValue("Berlin", "select city from Company where cdo_id=1 and cdo_version=1");
}
-
- /**
- * @author Eike Stepper
- */
- public static final class HSQLDB extends HorizontalTest
- {
- @Override
- protected IDBConnectionProvider createDBConnectionProvider()
- {
- HSQLDBDataSource dataSource = new HSQLDBDataSource();
- dataSource.setDatabase("jdbc:hsqldb:mem:storetest");
- dataSource.setUser("sa");
-
- return new DataSourceConnectionProvider(dataSource);
- }
-
- @Override
- protected HSQLDBAdapter createDBAdapter()
- {
- return new HSQLDBAdapter();
- }
- }
}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/TestLogic.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/TestLogic.java
index 6b56251..3c5b684 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/TestLogic.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/store/logic/TestLogic.java
@@ -8,7 +8,7 @@
* Contributors:
* Eike Stepper - initial API and implementation
**************************************************************************/
-package org.eclipse.emf.cdo.tests.store;
+package org.eclipse.emf.cdo.tests.store.logic;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.internal.server.Repository;