cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [03/39] cayenne git commit: Implement DBCleaner
Date Thu, 27 Nov 2014 07:11:46 GMT
http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContextWriteIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContextWriteIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContextWriteIT.java
index 1f46ecb..33be4b1 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContextWriteIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContextWriteIT.java
@@ -37,8 +37,10 @@ import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.testdo.testmap.PaintingInfo;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Types;
@@ -52,7 +54,7 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime("cayenne-small-testmap.xml")
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class NestedDataContextWriteIT extends ServerCase {
 
     @Inject
@@ -71,14 +73,8 @@ public class NestedDataContextWriteIT extends ServerCase {
     private TableHelper tPainting;
     private TableHelper tPaintingInfo;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockIT.java
index c19a875..4796ace 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/NestedDataContext_DeadlockIT.java
@@ -26,8 +26,10 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.List;
@@ -35,7 +37,7 @@ import java.util.Random;
 
 import static org.junit.Assert.assertFalse;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class NestedDataContext_DeadlockIT extends ServerCase {
 
     @Inject
@@ -49,14 +51,8 @@ public class NestedDataContext_DeadlockIT extends ServerCase {
 
     protected TableHelper tArtist;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/NumericTypesIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/NumericTypesIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/NumericTypesIT.java
index c0e30ef..491715e 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/NumericTypesIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/NumericTypesIT.java
@@ -36,8 +36,10 @@ import org.apache.cayenne.testdo.numeric_types.DecimalPKTestEntity;
 import org.apache.cayenne.testdo.numeric_types.LongEntity;
 import org.apache.cayenne.testdo.numeric_types.SmallintTestEntity;
 import org.apache.cayenne.testdo.numeric_types.TinyintTestEntity;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.math.BigDecimal;
@@ -51,7 +53,7 @@ import static org.junit.Assert.assertSame;
 
 /**
  */
-@UseServerRuntime(ServerCase.NUMERIC_TYPES_PROJECT)
+@UseServerRuntime(CayenneProjects.NUMERIC_TYPES_PROJECT)
 public class NumericTypesIT extends ServerCase {
 
     @Inject
@@ -69,13 +71,8 @@ public class NumericTypesIT extends ServerCase {
     protected TableHelper tSmallintTest;
     protected TableHelper tTinyintTest;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("BOOLEAN_TEST");
-        dbHelper.deleteAll("SMALLINT_TEST");
-        dbHelper.deleteAll("TINYINT_TEST");
-        dbHelper.deleteAll("DECIMAL_PK_TST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tSmallintTest = new TableHelper(dbHelper, "SMALLINT_TEST");
         tSmallintTest.setColumns("ID", "SMALLINT_COL");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingIT.java
index cf60725..6017252 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreDiffRetainingIT.java
@@ -25,8 +25,10 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Painting;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Types;
@@ -34,7 +36,7 @@ import java.sql.Types;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class ObjectStoreDiffRetainingIT extends ServerCase {
 
     @Inject
@@ -46,14 +48,8 @@ public class ObjectStoreDiffRetainingIT extends ServerCase {
     protected TableHelper tArtist;
     protected TableHelper tPainting;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME", "DATE_OF_BIRTH")
                 .setColumnTypes(Types.BIGINT, Types.CHAR, Types.DATE);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreGCIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreGCIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreGCIT.java
index d5ccbc6..4a57a6d 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreGCIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreGCIT.java
@@ -22,33 +22,21 @@ import org.apache.cayenne.Cayenne;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class ObjectStoreGCIT extends ServerCase {
 
     @Inject
     private DataContext context;
 
-    @Inject
-    private DBHelper dbHelper;
-
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-    }
-
     @Test
     public void testReleaseUnreferenced() throws Exception {
         context.performGenericQuery(new SQLTemplate(

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreIT.java
index 55c5efc..70a726c 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/ObjectStoreIT.java
@@ -28,6 +28,7 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Gallery;
 import org.apache.cayenne.testdo.testmap.Painting;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -40,7 +41,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class ObjectStoreIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/OptimisticLockingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/OptimisticLockingIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/OptimisticLockingIT.java
index edcf679..1842fec 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/OptimisticLockingIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/OptimisticLockingIT.java
@@ -27,8 +27,10 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.locking.RelLockingTestEntity;
 import org.apache.cayenne.testdo.locking.SimpleLockingTestEntity;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Types;
@@ -40,7 +42,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ServerCase.LOCKING_PROJECT)
+@UseServerRuntime(CayenneProjects.LOCKING_PROJECT)
 public class OptimisticLockingIT extends ServerCase {
 
     @Inject
@@ -53,12 +55,8 @@ public class OptimisticLockingIT extends ServerCase {
     protected TableHelper tRelLockingTest;
     protected TableHelper tLockingHelper;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("LOCKING_HELPER");
-        dbHelper.deleteAll("REL_LOCKING_TEST");
-        dbHelper.deleteAll("SIMPLE_LOCKING_TEST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tSimpleLockingTest = new TableHelper(dbHelper, "SIMPLE_LOCKING_TEST");
         tSimpleLockingTest.setColumns("LOCKING_TEST_ID", "NAME", "DESCRIPTION")
                 .setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.VARCHAR);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/PrefetchProcessorTreeBuilderIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/PrefetchProcessorTreeBuilderIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/PrefetchProcessorTreeBuilderIT.java
index 5a4e6fa..f7814fe 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/PrefetchProcessorTreeBuilderIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/PrefetchProcessorTreeBuilderIT.java
@@ -32,6 +32,7 @@ import org.apache.cayenne.reflect.ClassDescriptor;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Gallery;
 import org.apache.cayenne.testdo.testmap.Painting;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -47,7 +48,7 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class PrefetchProcessorTreeBuilderIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/PrimitiveAttributesIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/PrimitiveAttributesIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/PrimitiveAttributesIT.java
index a7cef30..5fa1907 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/PrimitiveAttributesIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/PrimitiveAttributesIT.java
@@ -19,26 +19,18 @@
 package org.apache.cayenne.access;
 
 import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.primitive.PrimitivesTestEntity;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
-@UseServerRuntime(ServerCase.PRIMITIVE_PROJECT)
+@UseServerRuntime(CayenneProjects.PRIMITIVE_PROJECT)
 public class PrimitiveAttributesIT extends ServerCase {
 
     @Inject
     private DataContext context;
 
-    @Inject
-    private DBHelper dbHelper;
-
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PRIMITIVES_TEST");
-    }
-
     @Test
     public void testCommit() {
         PrimitivesTestEntity e = context.newObject(PrimitivesTestEntity.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/QuotedIdentifiersIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/QuotedIdentifiersIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/QuotedIdentifiersIT.java
index b629dbb..b70b590 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/QuotedIdentifiersIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/QuotedIdentifiersIT.java
@@ -28,11 +28,12 @@ import org.apache.cayenne.query.ObjectIdQuery;
 import org.apache.cayenne.query.RelationshipQuery;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.query.UpdateBatchQuery;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.quotemap.QuoteAdress;
 import org.apache.cayenne.testdo.quotemap.Quote_Person;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Collections;
@@ -41,19 +42,14 @@ import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ServerCase.QUOTED_IDENTIFIERS_PROJECT)
+@UseServerRuntime(CayenneProjects.QUOTED_IDENTIFIERS_PROJECT)
 public class QuotedIdentifiersIT extends ServerCase {
 
     @Inject
     private ObjectContext context;
 
-    @Inject
-    private DBHelper dbHelper;
-
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("quote Person");
-        dbHelper.deleteAll("QUOTED_ADDRESS");
+    @Before
+    public void testSetUp() throws Exception {
 
         QuoteAdress quoteAdress = context.newObject(QuoteAdress.class);
         quoteAdress.setCity("city");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
index ba5b085..e4b992f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/ReturnTypesMappingIT.java
@@ -22,11 +22,11 @@ import org.apache.cayenne.DataRow;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.NamedQuery;
 import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.return_types.ReturnTypesMap1;
 import org.apache.cayenne.testdo.return_types.ReturnTypesMap2;
 import org.apache.cayenne.testdo.return_types.ReturnTypesMapLobs1;
 import org.apache.cayenne.unit.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -44,26 +44,14 @@ import static org.junit.Assert.assertTrue;
 /**
  * Test Types mapping for selected columns
  */
-@UseServerRuntime(ServerCase.RETURN_TYPES_PROJECT)
+@UseServerRuntime(CayenneProjects.RETURN_TYPES_PROJECT)
 public class ReturnTypesMappingIT extends ServerCase {
 
     @Inject
     private DataContext context;
     
     @Inject
-    private DBHelper dbHelper;
-    
-    @Inject
     private UnitDbAdapter unitDbAdapter;
-    
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        if (unitDbAdapter.supportsLobs()) {
-            dbHelper.deleteAll("TYPES_MAPPING_LOBS_TEST1");
-            dbHelper.deleteAll("TYPES_MAPPING_TEST2");
-        }
-        dbHelper.deleteAll("TYPES_MAPPING_TEST1");
-    }
 
     /*
      * TODO: olga: We need divided TYPES_MAPPING_TES2 to 2 schemas with lobs columns and not lobs columns 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsIT.java
index d1d6ee6..d373f30 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListDataRowsIT.java
@@ -28,8 +28,10 @@ import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Iterator;
@@ -42,7 +44,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Tests IncrementalFaultList behavior when fetching data rows.
  */
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class SimpleIdIncrementalFaultListDataRowsIT extends ServerCase {
 
     @Inject
@@ -57,14 +59,8 @@ public class SimpleIdIncrementalFaultListDataRowsIT extends ServerCase {
     private TableHelper tArtist;
     private SimpleIdIncrementalFaultList<?> list;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
         createArtistsDataSet();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListIT.java
index 42dbc25..ae24849 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListIT.java
@@ -29,8 +29,10 @@ import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Iterator;
@@ -43,7 +45,7 @@ import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class SimpleIdIncrementalFaultListIT extends ServerCase {
 
     @Inject
@@ -54,14 +56,8 @@ public class SimpleIdIncrementalFaultListIT extends ServerCase {
 
     private TableHelper tArtist;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListPrefetchIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListPrefetchIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListPrefetchIT.java
index fee6220..def1bb4 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListPrefetchIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/SimpleIdIncrementalFaultListPrefetchIT.java
@@ -33,8 +33,10 @@ import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.List;
@@ -44,7 +46,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class SimpleIdIncrementalFaultListPrefetchIT extends ServerCase {
 
     @Inject
@@ -59,14 +61,8 @@ public class SimpleIdIncrementalFaultListPrefetchIT extends ServerCase {
     protected TableHelper tArtist;
     protected TableHelper tPaining;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java
index c9dd4aa..29fab90 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritance1IT.java
@@ -23,10 +23,10 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.exp.ExpressionFactory;
 import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.inheritance_flat.Group;
 import org.apache.cayenne.testdo.inheritance_flat.Role;
 import org.apache.cayenne.testdo.inheritance_flat.User;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -36,24 +36,12 @@ import static org.junit.Assert.assertTrue;
 /**
  * Special test cases per CAY-1378, CAY-1379.
  */
-@UseServerRuntime(ServerCase.INHERITANCE_SINGLE_TABLE1_PROJECT)
+@UseServerRuntime(CayenneProjects.INHERITANCE_SINGLE_TABLE1_PROJECT)
 public class SingleTableInheritance1IT extends ServerCase {
 
     @Inject
     private ObjectContext context;
 
-    @Inject
-    private DBHelper dbHelper;
-
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-
-        dbHelper.deleteAll("GROUP_MEMBERS");
-        dbHelper.deleteAll("USER_PROPERTIES");
-        dbHelper.deleteAll("GROUP_PROPERTIES");
-        dbHelper.deleteAll("ROLES");
-    }
-
     @Test
     public void testGroupActions() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
index c2ce9c3..d17e15e 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/SingleTableInheritanceIT.java
@@ -38,8 +38,10 @@ import org.apache.cayenne.testdo.inheritance_people.Manager;
 import org.apache.cayenne.testdo.inheritance_people.PersonNotes;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Types;
@@ -51,7 +53,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.PEOPLE_PROJECT)
+@UseServerRuntime(CayenneProjects.PEOPLE_PROJECT)
 public class SingleTableInheritanceIT extends ServerCase {
 
     @Inject
@@ -71,8 +73,8 @@ public class SingleTableInheritanceIT extends ServerCase {
     private TableHelper tClientCompany;
     private TableHelper tDepartment;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
+    @Before
+    public void testSetUp() throws Exception {
         tPerson = new TableHelper(dbHelper, "PERSON");
         tPerson.setColumns(
                 "PERSON_ID",
@@ -99,12 +101,6 @@ public class SingleTableInheritanceIT extends ServerCase {
 
         // manually break circular deps
         tPerson.update().set("DEPARTMENT_ID", null, Types.INTEGER).execute();
-
-        dbHelper.deleteAll("ADDRESS");
-        dbHelper.deleteAll("DEPARTMENT");
-        dbHelper.deleteAll("PERSON_NOTES");
-        dbHelper.deleteAll("PERSON");
-        dbHelper.deleteAll("CLIENT_COMPANY");
     }
 
     private void create2PersonDataSet() throws Exception {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/ToManyListIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/ToManyListIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/ToManyListIT.java
index 6355ed5..715e7e3 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/ToManyListIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/ToManyListIT.java
@@ -21,9 +21,9 @@ package org.apache.cayenne.access;
 
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Painting;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.apache.cayenne.util.PersistentObjectList;
@@ -37,24 +37,12 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class ToManyListIT extends ServerCase {
 
     @Inject
     private DataContext context;
 
-    @Inject
-    private DBHelper dbHelper;
-
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-    }
-
     private ToManyList createForNewArtist() {
         Artist artist = context.newObject(Artist.class);
         return new ToManyList(artist, Artist.PAINTING_ARRAY_PROPERTY);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/TransactionThreadIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/TransactionThreadIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/TransactionThreadIT.java
index caf6d6a..a19b86c 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/TransactionThreadIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/TransactionThreadIT.java
@@ -22,11 +22,11 @@ package org.apache.cayenne.access;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.tx.BaseTransaction;
 import org.apache.cayenne.tx.CayenneTransaction;
 import org.apache.cayenne.tx.Transaction;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -36,27 +36,15 @@ import java.sql.Connection;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class TransactionThreadIT extends ServerCase {
 
     @Inject
     private DataContext context;
 
     @Inject
-    protected DBHelper dbHelper;
-
-    @Inject
     private JdbcEventLogger logger;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-    }
-
     @Test
     public void testThreadConnectionReuseOnSelect() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/UUIDIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/UUIDIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/UUIDIT.java
index dfea01e..fba1743 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/UUIDIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/UUIDIT.java
@@ -26,8 +26,10 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.uuid.UuidPkEntity;
 import org.apache.cayenne.testdo.uuid.UuidTestEntity;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.UUID;
@@ -35,7 +37,7 @@ import java.util.UUID;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ServerCase.UUID_PROJECT)
+@UseServerRuntime(CayenneProjects.UUID_PROJECT)
 public class UUIDIT extends ServerCase {
 
     @Inject
@@ -46,11 +48,8 @@ public class UUIDIT extends ServerCase {
 
     private TableHelper uuidPkEntity;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("UUID_TEST");
-        dbHelper.deleteAll("UUID_PK_ENTITY");
-
+    @Before
+    public void testSetUp() throws Exception {
         uuidPkEntity = new TableHelper(dbHelper, "UUID_PK_ENTITY", "ID");
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/UserTransactionIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/UserTransactionIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/UserTransactionIT.java
index d88ae08..55b27d1 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/UserTransactionIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/UserTransactionIT.java
@@ -26,6 +26,7 @@ import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.tx.BaseTransaction;
 import org.apache.cayenne.tx.CayenneTransaction;
 import org.apache.cayenne.tx.Transaction;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -34,7 +35,7 @@ import java.sql.Connection;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class UserTransactionIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/VerticalInheritanceIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/VerticalInheritanceIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/VerticalInheritanceIT.java
index a1669d1..206a24a 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/VerticalInheritanceIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/VerticalInheritanceIT.java
@@ -31,6 +31,7 @@ import org.apache.cayenne.testdo.inheritance_vertical.IvRoot;
 import org.apache.cayenne.testdo.inheritance_vertical.IvSub1;
 import org.apache.cayenne.testdo.inheritance_vertical.IvSub1Sub1;
 import org.apache.cayenne.testdo.inheritance_vertical.IvSub2;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -46,7 +47,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.INHERITANCE_VERTICAL_PROJECT)
+@UseServerRuntime(CayenneProjects.INHERITANCE_VERTICAL_PROJECT)
 public class VerticalInheritanceIT extends ServerCase {
 
 	@Inject
@@ -55,22 +56,6 @@ public class VerticalInheritanceIT extends ServerCase {
 	@Inject
 	protected DBHelper dbHelper;
 
-	@Override
-	protected void setUpAfterInjection() throws Exception {
-
-		dbHelper.deleteAll("IV_SUB1_SUB1");
-		dbHelper.deleteAll("IV_SUB1");
-		dbHelper.deleteAll("IV_SUB2");
-		dbHelper.deleteAll("IV_ROOT");
-
-		dbHelper.deleteAll("IV1_SUB1");
-		dbHelper.deleteAll("IV1_ROOT");
-
-		dbHelper.deleteAll("IV2_SUB1");
-		dbHelper.deleteAll("IV2_ROOT");
-		dbHelper.deleteAll("IV2_X");
-	}
-
     @Test
 	public void testInsert_Root() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyBase.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyBase.java b/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyBase.java
index 3022457..39da5e9 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyBase.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyBase.java
@@ -18,15 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.access.dbsync;
 
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.access.DataNode;
@@ -36,6 +27,15 @@ import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.unit.di.server.ServerCase;
 
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
 public class SchemaUpdateStrategyBase extends ServerCase {
 
 	@Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyIT.java
index 29ca1ae..78ef23e 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/SchemaUpdateStrategyIT.java
@@ -22,7 +22,7 @@ import org.apache.cayenne.access.MockOperationObserver;
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLTemplate;
-import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
@@ -32,7 +32,7 @@ import java.util.Map;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.SUS_PROJECT)
+@UseServerRuntime(CayenneProjects.SUS_PROJECT)
 public class SchemaUpdateStrategyIT extends SchemaUpdateStrategyBase {
 
     @Test

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialOrCreateSchemaStrategyIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialOrCreateSchemaStrategyIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialOrCreateSchemaStrategyIT.java
index f38e524..45dd434 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialOrCreateSchemaStrategyIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialOrCreateSchemaStrategyIT.java
@@ -21,7 +21,7 @@ package org.apache.cayenne.access.dbsync;
 import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.OperationObserver;
 import org.apache.cayenne.query.SQLTemplate;
-import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
@@ -33,7 +33,7 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ServerCase.SUS_PROJECT)
+@UseServerRuntime(CayenneProjects.SUS_PROJECT)
 public class ThrowOnPartialOrCreateSchemaStrategyIT extends SchemaUpdateStrategyBase {
 
     @Test

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialSchemaStrategyIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialSchemaStrategyIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialSchemaStrategyIT.java
index 8738e2f..576f4e8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialSchemaStrategyIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/dbsync/ThrowOnPartialSchemaStrategyIT.java
@@ -22,7 +22,7 @@ import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.access.MockOperationObserver;
 import org.apache.cayenne.query.Query;
 import org.apache.cayenne.query.SQLTemplate;
-import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
@@ -32,7 +32,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ServerCase.SUS_PROJECT)
+@UseServerRuntime(CayenneProjects.SUS_PROJECT)
 public class ThrowOnPartialSchemaStrategyIT extends SchemaUpdateStrategyBase {
 
     @Test

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionGeneratedIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionGeneratedIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionGeneratedIT.java
index 73723c8..38b6736 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionGeneratedIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionGeneratedIT.java
@@ -28,6 +28,7 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.InsertBatchQuery;
 import org.apache.cayenne.testdo.generated.GeneratedColumnTestEntity;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -36,7 +37,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ServerCase.GENERATED_PROJECT)
+@UseServerRuntime(CayenneProjects.GENERATED_PROJECT)
 public class BatchActionGeneratedIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionIT.java
index 3a72e1e..9fc7410 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionIT.java
@@ -28,6 +28,7 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.InsertBatchQuery;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -35,7 +36,7 @@ import org.junit.Test;
 import static org.junit.Assert.assertFalse;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class BatchActionIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingIT.java
index 4152e50..d93f7a8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/BatchActionLockingIT.java
@@ -36,6 +36,7 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.query.DeleteBatchQuery;
 import org.apache.cayenne.testdo.locking.SimpleLockingTestEntity;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -51,7 +52,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ServerCase.LOCKING_PROJECT)
+@UseServerRuntime(CayenneProjects.LOCKING_PROJECT)
 public class BatchActionLockingIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionIT.java
index 58a15ed..18895ba 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SQLTemplateActionIT.java
@@ -33,10 +33,12 @@ import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.ServerCaseDataSourceFactory;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.apache.cayenne.unit.util.SQLTemplateCustomizer;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Connection;
@@ -51,7 +53,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class SQLTemplateActionIT extends ServerCase {
 
     @Inject
@@ -74,14 +76,8 @@ public class SQLTemplateActionIT extends ServerCase {
 
     protected TableHelper tArtist;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
+    @Before
+    public void testSetUp() throws Exception {
         tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME", "DATE_OF_BIRTH");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SelectActionIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SelectActionIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SelectActionIT.java
index 9786266..b2ca3a4 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SelectActionIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/jdbc/SelectActionIT.java
@@ -23,10 +23,10 @@ import org.apache.cayenne.access.DataContext;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.exp.Expression;
 import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.lob.ClobTestEntity;
 import org.apache.cayenne.testdo.lob.ClobTestRelation;
 import org.apache.cayenne.unit.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -36,7 +36,7 @@ import java.util.List;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ServerCase.LOB_PROJECT)
+@UseServerRuntime(CayenneProjects.LOB_PROJECT)
 public class SelectActionIT extends ServerCase {
 
     @Inject
@@ -45,18 +45,6 @@ public class SelectActionIT extends ServerCase {
     @Inject
     private UnitDbAdapter accessStackAdapter;
 
-    @Inject
-    private DBHelper dbHelper;
-
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("CLOB_TEST_RELATION");
-        
-        if (accessStackAdapter.supportsLobs()) {
-            dbHelper.deleteAll("CLOB_TEST");
-        }
-    }
-
     @Test
     public void testFetchLimit_DistinctResultIterator() throws Exception {
         if (accessStackAdapter.supportsLobs()) {

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorIT.java
index 8d6ee68..439fb20 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DefaultBatchTranslatorIT.java
@@ -27,6 +27,7 @@ import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.BatchQuery;
 import org.apache.cayenne.query.BatchQueryRow;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -37,7 +38,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class DefaultBatchTranslatorIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorIT.java
index c6c2ad6..656cd84 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/DeleteBatchTranslatorIT.java
@@ -29,6 +29,7 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.DeleteBatchQuery;
 import org.apache.cayenne.testdo.locking.SimpleLockingTestEntity;
 import org.apache.cayenne.unit.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -43,7 +44,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ServerCase.LOCKING_PROJECT)
+@UseServerRuntime(CayenneProjects.LOCKING_PROJECT)
 public class DeleteBatchTranslatorIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorIT.java
index 5febbae..ce66e95 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/InsertBatchTranslatorIT.java
@@ -27,6 +27,7 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.InsertBatchQuery;
 import org.apache.cayenne.testdo.locking.SimpleLockingTestEntity;
 import org.apache.cayenne.unit.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -36,7 +37,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ServerCase.LOCKING_PROJECT)
+@UseServerRuntime(CayenneProjects.LOCKING_PROJECT)
 public class InsertBatchTranslatorIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
index de14c36..a898b2d 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/SoftDeleteBatchTranslatorIT.java
@@ -34,6 +34,7 @@ import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.parallel.ParallelTestContainer;
 import org.apache.cayenne.testdo.soft_delete.SoftDelete;
 import org.apache.cayenne.unit.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -46,7 +47,7 @@ import java.util.List;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ServerCase.SOFT_DELETE_PROJECT)
+@UseServerRuntime(CayenneProjects.SOFT_DELETE_PROJECT)
 public class SoftDeleteBatchTranslatorIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorIT.java
index 848860a..d1e23bd 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/batch/UpdateBatchTranslatorIT.java
@@ -28,6 +28,7 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.query.UpdateBatchQuery;
 import org.apache.cayenne.testdo.locking.SimpleLockingTestEntity;
 import org.apache.cayenne.unit.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -42,7 +43,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ServerCase.LOCKING_PROJECT)
+@UseServerRuntime(CayenneProjects.LOCKING_PROJECT)
 public class UpdateBatchTranslatorIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/ejbql/EJBQLSelectTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/ejbql/EJBQLSelectTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/ejbql/EJBQLSelectTranslatorIT.java
index c9c7203..184a259 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/ejbql/EJBQLSelectTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/ejbql/EJBQLSelectTranslatorIT.java
@@ -26,6 +26,7 @@ import org.apache.cayenne.ejbql.EJBQLParser;
 import org.apache.cayenne.ejbql.EJBQLParserFactory;
 import org.apache.cayenne.query.EJBQLQuery;
 import org.apache.cayenne.query.SQLTemplate;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -37,7 +38,7 @@ import java.util.Map;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class EJBQLSelectTranslatorIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/OrderingTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/OrderingTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/OrderingTranslatorIT.java
index 34ead39..a5ceb73 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/OrderingTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/OrderingTranslatorIT.java
@@ -25,16 +25,19 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.ServerCaseDataSourceFactory;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Connection;
 
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class OrderingTranslatorIT extends ServerCase {
 
     @Inject
@@ -45,13 +48,13 @@ public class OrderingTranslatorIT extends ServerCase {
 
     private Connection connection;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
+    @Before
+    public void testSetUp() throws Exception {
         this.connection = dataSourceFactory.getSharedDataSource().getConnection();
     }
 
-    @Override
-    protected void tearDownBeforeInjection() throws Exception {
+    @After
+    public void testTearDown() throws Exception {
         connection.close();
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QualifierTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QualifierTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QualifierTranslatorIT.java
index 9417ac4..52ee98f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QualifierTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QualifierTranslatorIT.java
@@ -34,9 +34,12 @@ import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.query.MockQuery;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.testdo.testmap.Gallery;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.ServerCaseDataSourceFactory;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Connection;
@@ -45,7 +48,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class QualifierTranslatorIT extends ServerCase {
 
     @Inject
@@ -56,13 +59,13 @@ public class QualifierTranslatorIT extends ServerCase {
 
     private Connection connection;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
+    @Before
+    public void testSetUp() throws Exception {
         this.connection = dataSourceFactory.getSharedDataSource().getConnection();
     }
 
-    @Override
-    protected void tearDownBeforeInjection() throws Exception {
+    @After
+    public void testTearDown() throws Exception {
         connection.close();
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QueryAssemblerIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QueryAssemblerIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QueryAssemblerIT.java
index 133281b..42bc4de 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QueryAssemblerIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/QueryAssemblerIT.java
@@ -23,9 +23,12 @@ import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.ServerCaseDataSourceFactory;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Connection;
@@ -33,7 +36,7 @@ import java.sql.Connection;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class QueryAssemblerIT extends ServerCase {
 
     @Inject
@@ -46,14 +49,14 @@ public class QueryAssemblerIT extends ServerCase {
 
     private TstQueryAssembler qa;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
+    @Before
+    public void testSetUp() throws Exception {
         this.connection = dataSourceFactory.getSharedDataSource().getConnection();
         this.qa = new TstQueryAssembler(new SelectQuery<Object>(), dataNode, connection);
     }
 
-    @Override
-    protected void tearDownBeforeInjection() throws Exception {
+    @After
+    public void testTearDown() throws Exception {
         connection.close();
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/SelectTranslatorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/SelectTranslatorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/SelectTranslatorIT.java
index c872a4b..25d62bd 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/SelectTranslatorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/translator/select/SelectTranslatorIT.java
@@ -38,9 +38,12 @@ import org.apache.cayenne.testdo.testmap.ArtistExhibit;
 import org.apache.cayenne.testdo.testmap.CompoundPainting;
 import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.unit.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.ServerCaseDataSourceFactory;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Connection;
@@ -52,7 +55,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class SelectTranslatorIT extends ServerCase {
 
     @Inject
@@ -75,19 +78,13 @@ public class SelectTranslatorIT extends ServerCase {
 
     private Connection connection;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-
+    @Before
+    public void testSetUp() throws Exception {
         this.connection = dataSourceFactory.getSharedDataSource().getConnection();
     }
 
-    @Override
-    protected void tearDownBeforeInjection() throws Exception {
+    @After
+    public void testTearDown() throws Exception {
         connection.close();
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverIT.java
index dafacd6..385759a 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverIT.java
@@ -20,6 +20,7 @@
 package org.apache.cayenne.access.util;
 
 import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -27,7 +28,7 @@ import org.junit.Test;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class DefaultOperationObserverIT extends ServerCase {
 
     @Test

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/ashwood/AshwoodEntitySorterIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/ashwood/AshwoodEntitySorterIT.java b/cayenne-server/src/test/java/org/apache/cayenne/ashwood/AshwoodEntitySorterIT.java
index 1443c4b..8333b73 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/ashwood/AshwoodEntitySorterIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/ashwood/AshwoodEntitySorterIT.java
@@ -26,8 +26,10 @@ import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.relationships.ReflexiveAndToOne;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Types;
@@ -36,7 +38,7 @@ import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ServerCase.RELATIONSHIPS_PROJECT)
+@UseServerRuntime(CayenneProjects.RELATIONSHIPS_PROJECT)
 public class AshwoodEntitySorterIT extends ServerCase {
 
     @Inject
@@ -48,13 +50,8 @@ public class AshwoodEntitySorterIT extends ServerCase {
     protected TableHelper tRelationshipHelper;
     protected TableHelper tReflexiveAndToOne;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("REFLEXIVE_AND_TO_ONE");
-        dbHelper.deleteAll("FK_OF_DIFFERENT_TYPE");
-        dbHelper.deleteAll("MEANINGFUL_FK");
-        dbHelper.deleteAll("RELATIONSHIP_HELPER");
-
+    @Before
+    public void testSetUp() throws Exception {
         tRelationshipHelper = new TableHelper(dbHelper, "RELATIONSHIP_HELPER");
         tRelationshipHelper.setColumns("RELATIONSHIP_HELPER_ID", "NAME");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/cache/QueryCacheIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/cache/QueryCacheIT.java b/cayenne-server/src/test/java/org/apache/cayenne/cache/QueryCacheIT.java
index 9536e44..4b19d24 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/cache/QueryCacheIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/cache/QueryCacheIT.java
@@ -23,6 +23,7 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.QueryCacheStrategy;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -31,7 +32,7 @@ import java.util.List;
 
 import static org.junit.Assert.assertNotSame;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class QueryCacheIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/JNDIDataSourceFactoryIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/JNDIDataSourceFactoryIT.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/JNDIDataSourceFactoryIT.java
index c5e8a75..757aa47 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/JNDIDataSourceFactoryIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/JNDIDataSourceFactoryIT.java
@@ -23,6 +23,7 @@ import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.di.Injector;
 import org.apache.cayenne.unit.JNDISetup;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -33,7 +34,7 @@ import javax.naming.NameNotFoundException;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class JNDIDataSourceFactoryIT extends ServerCase {
     
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder_InAction_IT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder_InAction_IT.java b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder_InAction_IT.java
index 954808e..25c0aa4 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder_InAction_IT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/configuration/server/ServerRuntimeBuilder_InAction_IT.java
@@ -24,8 +24,10 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SQLSelect;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import javax.sql.DataSource;
@@ -33,7 +35,7 @@ import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class ServerRuntimeBuilder_InAction_IT extends ServerCase {
 
     @Inject
@@ -47,17 +49,8 @@ public class ServerRuntimeBuilder_InAction_IT extends ServerCase {
 
     private DataSource dataSource;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-        dbHelper.deleteAll("EXHIBIT");
-        dbHelper.deleteAll("GALLERY");
-
-        TableHelper tArtist = new TableHelper(dbHelper, "ARTIST");
+    @Before
+    public void testSetUp() throws Exception { TableHelper tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
         tArtist.insert(33001, "AA1");
         tArtist.insert(33002, "AA2");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/conn/PoolManagerIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/conn/PoolManagerIT.java b/cayenne-server/src/test/java/org/apache/cayenne/conn/PoolManagerIT.java
index ff0b69f..832470b 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/conn/PoolManagerIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/conn/PoolManagerIT.java
@@ -20,6 +20,7 @@
 package org.apache.cayenne.conn;
 
 import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -28,7 +29,7 @@ import java.sql.Connection;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class PoolManagerIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/dba/AutoAdapterIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/dba/AutoAdapterIT.java b/cayenne-server/src/test/java/org/apache/cayenne/dba/AutoAdapterIT.java
index e267277..7140e83 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/dba/AutoAdapterIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/dba/AutoAdapterIT.java
@@ -26,6 +26,7 @@ import org.apache.cayenne.di.Provider;
 import org.apache.cayenne.log.NoopJdbcEventLogger;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -36,7 +37,7 @@ import static org.junit.Assert.assertSame;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class AutoAdapterIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/dba/ConcurrentPkGeneratorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/dba/ConcurrentPkGeneratorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/dba/ConcurrentPkGeneratorIT.java
index 8b0de03..7d2c06e 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/dba/ConcurrentPkGeneratorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/dba/ConcurrentPkGeneratorIT.java
@@ -27,6 +27,7 @@ import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.testdo.qualified.Qualified1;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -41,7 +42,7 @@ import java.util.concurrent.TimeUnit;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime("cayenne-qualified.xml")
+@UseServerRuntime(CayenneProjects.QUALIFIED_PROJECT)
 public class ConcurrentPkGeneratorIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcAdapterIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcAdapterIT.java b/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcAdapterIT.java
index b760549..c744b6a 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcAdapterIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcAdapterIT.java
@@ -26,6 +26,7 @@ import org.apache.cayenne.map.DataMap;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbKeyGenerator;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -35,7 +36,7 @@ import java.sql.Types;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class JdbcAdapterIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorIT.java
index 8a1c692..e60daac 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/dba/JdbcPkGeneratorIT.java
@@ -24,16 +24,19 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.SchemaBuilder;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Collections;
 
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class JdbcPkGeneratorIT extends ServerCase {
 
     @Inject
@@ -44,14 +47,14 @@ public class JdbcPkGeneratorIT extends ServerCase {
     
     @Inject
     private SchemaBuilder schemaBuilder;
-    
-    @Override
-    protected void setUpAfterInjection() throws Exception {
+
+    @Before
+    public void testSetUp() throws Exception {
         schemaBuilder.dropPKSupport();
     }
     
-    @Override
-    protected void tearDownBeforeInjection() throws Exception {
+    @After
+    public void testTearDown() throws Exception {
 
         if (JdbcPkGenerator.class.isAssignableFrom(adapter.getPkGenerator().getClass())) {
             // reset PK gen properly before updating PKs in DB

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/dba/PkGeneratorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/dba/PkGeneratorIT.java b/cayenne-server/src/test/java/org/apache/cayenne/dba/PkGeneratorIT.java
index 2d8214b..0ca4283 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/dba/PkGeneratorIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/dba/PkGeneratorIT.java
@@ -23,8 +23,10 @@ import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.unit.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.ArrayList;
@@ -34,7 +36,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(CayenneProjects.TESTMAP_PROJECT)
 public class PkGeneratorIT extends ServerCase {
 
     @Inject
@@ -46,9 +48,8 @@ public class PkGeneratorIT extends ServerCase {
     private PkGenerator pkGenerator;
     private DbEntity paintingEntity;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-
+    @Before
+    public void testSetUp() throws Exception {
         pkGenerator = node.getAdapter().getPkGenerator();
         paintingEntity = node.getEntityResolver().getDbEntity("PAINTING");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-server/src/test/java/org/apache/cayenne/dba/TypesMappingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/dba/TypesMappingIT.java b/cayenne-server/src/test/java/org/apache/cayenne/dba/TypesMappingIT.java
index a07de22..0f3b36b 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/dba/TypesMappingIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/dba/TypesMappingIT.java
@@ -21,8 +21,10 @@ package org.apache.cayenne.dba;
 
 import org.apache.cayenne.MockSerializable;
 import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.ServerCaseDataSourceFactory;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
 import java.math.BigInteger;
@@ -37,6 +39,7 @@ import java.util.List;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+@UseServerRuntime(CayenneProjects.EMPTY_PROJECT)
 public class TypesMappingIT extends ServerCase {
 
     @Inject


Mime
View raw message