cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [7/8] cayenne git commit: Implement DBCleaner
Date Mon, 17 Nov 2014 19:04:00 GMT
Implement DBCleaner


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/368b4ac5
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/368b4ac5
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/368b4ac5

Branch: refs/heads/master
Commit: 368b4ac5d659e6659480a7c4852957b23333f00b
Parents: cfbfb68
Author: Savva Kolbechev <s.kolbachev@gmail.com>
Authored: Mon Nov 17 17:03:33 2014 +0300
Committer: Savva Kolbechev <s.kolbachev@gmail.com>
Committed: Mon Nov 17 17:03:33 2014 +0300

----------------------------------------------------------------------
 .../apache/cayenne/CayenneContextCayenneIT.java |  13 +-
 .../CayenneContextClientChannelEventsIT.java    |  14 +-
 .../cayenne/CayenneContextDeleteRulesIT.java    |   3 +-
 .../apache/cayenne/CayenneContextEJBQLIT.java   |  11 +-
 .../CayenneContextGraphDiffCompressorIT.java    |   3 +-
 .../org/apache/cayenne/CayenneContextIT.java    |   3 +-
 .../cayenne/CayenneContextInheritanceIT.java    |  11 +-
 .../CayenneContextMapRelationshipIT.java        |  11 +-
 .../cayenne/CayenneContextMeaningfulPKIT.java   |  10 +-
 .../cayenne/CayenneContextMergeHandlerIT.java   |   3 +-
 .../CayenneContextNamedQueryCachingIT.java      |  11 +-
 .../CayenneContextPaginatedListCachingIT.java   |  11 +-
 .../cayenne/CayenneContextPrimitiveIT.java      |  10 +-
 .../cayenne/CayenneContextReflexiveIT.java      |   3 +-
 .../cayenne/CayenneContextRefreshQueryIT.java   |  11 +-
 .../cayenne/CayenneContextRelationshipsIT.java  |  14 +-
 .../cayenne/CayenneContextSQLTemplateIT.java    |  13 +-
 .../cayenne/CayenneContextServerDiffsIT.java    |   3 +-
 .../cayenne/CayenneContextValidationIT.java     |  13 +-
 .../CayenneContextWithDataContextIT.java        |  11 +-
 .../apache/cayenne/NestedCayenneContextIT.java  |  16 +-
 .../cayenne/NestedCayenneContextTooneIT.java    |   4 +-
 .../cayenne/PersistentObjectInContextIT.java    |  11 +-
 .../cayenne/access/ClientServerChannelIT.java   |  12 +-
 .../access/ClientServerChannelQueryIT.java      |  11 +-
 .../cayenne/query/ClientExpressionIT.java       |  13 +-
 .../query/ClientSelectQueryExpressionIT.java    |  11 +-
 .../query/SelectQueryAbstractEntityIT.java      |  13 +-
 .../remote/CayenneContextDeletionIT.java        |   4 +-
 .../remote/ClientChannelServerDiffsIT.java      |   3 +-
 .../cayenne/remote/LightSuperClassIT.java       |  19 +-
 .../remote/NestedObjectContextLocalIT.java      |   4 +-
 .../NestedObjectContextParentEventsIT.java      |  16 +-
 .../remote/NestedObjectContextPeerEventsIT.java |  16 +-
 .../remote/NestedObjectContextRollbackIT.java   |   4 +-
 .../cayenne/remote/ROPPrefetchToManyMapIT.java  |  14 +-
 .../cayenne/remote/RelationshipChangeIT.java    |   4 +-
 .../cayenne/remote/RemoteCallbacksIT.java       |   9 +-
 .../cayenne/remote/RemoteCayenneCase.java       |   5 +
 .../remote/RemoteIncrementalFaultListIT.java    |  11 +-
 .../apache/cayenne/remote/RemoteRollbackIT.java |   4 +-
 .../apache/cayenne/remote/ValueInjectorIT.java  |   4 +-
 .../cayenne/unit/di/client/ClientCase.java      |  20 +-
 .../unit/di/client/ClientCaseSelfIT.java        |   3 +-
 .../cayenne/util/ObjectDetachOperationIT.java   |  11 +-
 .../util/ShallowMergeOperation_ClientIT.java    |  14 +-
 .../cayenne/CDOCollectionRelationshipIT.java    |  11 +-
 .../java/org/apache/cayenne/CDOMany2OneIT.java  |  16 +-
 .../org/apache/cayenne/CDOMany2OneNoRevIT.java  |   3 +-
 .../apache/cayenne/CDOMapRelationshipIT.java    |  14 +-
 .../java/org/apache/cayenne/CDOOne2ManyIT.java  |  17 +-
 .../org/apache/cayenne/CDOOne2OneDepIT.java     |   3 +-
 .../org/apache/cayenne/CDOOneDep2OneIT.java     |   3 +-
 .../org/apache/cayenne/CDOOneToManyFKIT.java    |  14 +-
 .../org/apache/cayenne/CDOOneToOneFKIT.java     |  13 +-
 .../apache/cayenne/CDOQualifiedEntitiesIT.java  |  11 +-
 .../apache/cayenne/CDOReflexiveRelDeleteIT.java |   9 +-
 .../org/apache/cayenne/CDOReflexiveRelIT.java   |   3 +-
 .../apache/cayenne/CDOSetRelationshipIT.java    |  11 +-
 .../org/apache/cayenne/CayenneCompoundIT.java   |  12 +-
 .../org/apache/cayenne/CayenneDOTestBase.java   |  20 +-
 .../CayenneDataObjectFlattenedRelIT.java        |  17 +-
 .../org/apache/cayenne/CayenneDataObjectIT.java |   3 +-
 .../cayenne/CayenneDataObjectInContextIT.java   |  14 +-
 .../CayenneDataObjectRelationshipsIT.java       |  14 +-
 .../cayenne/CayenneDataObjectValidationIT.java  |   3 +-
 .../test/java/org/apache/cayenne/CayenneIT.java |  14 +-
 .../org/apache/cayenne/CompoundPkChangeIT.java  |  13 +-
 .../cayenne/DataContextMaxIdQualifierIT.java    |  14 +-
 .../cayenne/DataObjectSerializationIT.java      |   3 +-
 .../cayenne/FlattenedRelationshipsIT.java       |  16 +-
 .../org/apache/cayenne/GenericMappingIT.java    |  13 +-
 .../org/apache/cayenne/ManyToManyNoJoinIT.java  |  13 +-
 .../java/org/apache/cayenne/MeaningfulFKIT.java |  12 +-
 .../apache/cayenne/OneWayRelationshipsIT.java   |  14 +-
 .../cayenne/PersistenceByReachabilityIT.java    |   3 +-
 .../org/apache/cayenne/PersistentObjectIT.java  |   3 +-
 .../org/apache/cayenne/PregeneratedPKIT.java    |  18 +-
 .../cayenne/access/DataContextBinaryPKIT.java   |  15 +-
 .../cayenne/access/DataContextBlobIT.java       |  14 +-
 .../cayenne/access/DataContextCallbacksIT.java  |  21 +-
 .../cayenne/access/DataContextCharPKIT.java     |  13 +-
 .../cayenne/access/DataContextCharTypeIT.java   |  12 +-
 .../cayenne/access/DataContextClobIT.java       |  14 +-
 .../cayenne/access/DataContextCommitIT.java     |  17 +-
 .../access/DataContextCompoundRelIT.java        |  13 +-
 .../cayenne/access/DataContextCrossDBIT.java    |   3 +-
 .../access/DataContextDataChannelEventsIT.java  |   3 +-
 .../access/DataContextDecoratedStackIT.java     |  16 +-
 .../cayenne/access/DataContextDelegateIT.java   |  21 +-
 .../DataContextDelegateSharedCacheIT.java       |   8 +-
 .../access/DataContextDeleteRulesIT.java        |  16 +-
 .../DataContextDisjointByIdPrefetchIT.java      |  14 +-
 ...ataContextDisjointByIdPrefetch_ExtrasIT.java |  15 +-
 .../access/DataContextEJBQLArrayResultIT.java   |  14 +-
 .../access/DataContextEJBQLConditionsIT.java    |  14 +-
 .../DataContextEJBQLConditionsPeopleIT.java     |  14 +-
 ...extEJBQLDateTimeFunctionalExpressionsIT.java |  12 +-
 .../access/DataContextEJBQLDeleteIT.java        |  14 +-
 .../access/DataContextEJBQLDeletePKIT.java      |  11 +-
 .../access/DataContextEJBQLFetchJoinIT.java     |  16 +-
 ...ataContextEJBQLFlattenedRelationshipsIT.java |  15 +-
 ...DataContextEJBQLFunctionalExpressionsIT.java |  16 +-
 .../access/DataContextEJBQLGroupByHavingIT.java |  16 +-
 .../access/DataContextEJBQLInheritanceIT.java   |  15 +-
 .../access/DataContextEJBQLIsNullIT.java        |  14 +-
 .../cayenne/access/DataContextEJBQLJoinsIT.java |  16 +-
 .../DataContextEJBQLNumericalFunctionalIT.java  |  12 +-
 .../access/DataContextEJBQLOrderByIT.java       |  14 +-
 .../access/DataContextEJBQLQueryCompoundIT.java |  11 +-
 .../cayenne/access/DataContextEJBQLQueryIT.java |  14 +-
 .../access/DataContextEJBQLSubqueryIT.java      |  15 +-
 .../DataContextEJBQLUpdateCompoundIT.java       |  11 +-
 .../access/DataContextEJBQLUpdateIT.java        |  14 +-
 .../DataContextEntityWithMeaningfulPKIT.java    |  12 +-
 .../DataContextExtendedTypeOperationsIT.java    |  12 +-
 .../cayenne/access/DataContextExtrasIT.java     |  15 +-
 .../DataContextFlattenedAttributesIT.java       |  14 +-
 .../apache/cayenne/access/DataContextIT.java    |  16 +-
 .../access/DataContextJoinAliasesIT.java        |  13 +-
 .../access/DataContextLocalObjectIT.java        |  16 +-
 .../cayenne/access/DataContextNoPkIT.java       |   8 +-
 .../access/DataContextObjectIdQueryIT.java      |  17 +-
 .../access/DataContextObjectTrackingIT.java     |  14 +-
 .../cayenne/access/DataContextOrderingIT.java   |  17 +-
 .../cayenne/access/DataContextOuterJoinsIT.java |   9 +-
 .../access/DataContextPaginatedQueryIT.java     |  13 +-
 .../access/DataContextPerformQueryAPIIT.java    |  16 +-
 .../access/DataContextPrefetchExtras1IT.java    |  12 +-
 .../access/DataContextPrefetchExtrasIT.java     |  14 +-
 .../cayenne/access/DataContextPrefetchIT.java   |  19 +-
 .../access/DataContextPrefetchMultistepIT.java  |  16 +-
 .../DataContextPrefetchQualifierOverlapIT.java  |  13 +-
 .../access/DataContextProcedureQueryIT.java     |  20 +-
 .../access/DataContextQualifiedEntityIT.java    |  14 +-
 .../DataContextQueryCachingEhCacheIT.java       |  20 +-
 .../access/DataContextQueryCachingIT.java       |  19 +-
 .../DataContextQueryCachingOSCacheIT.java       |  15 +-
 .../cayenne/access/DataContextQueryChainIT.java |  17 +-
 .../access/DataContextRefreshQueryIT.java       |  14 +-
 .../cayenne/access/DataContextRefreshingIT.java |  14 +-
 .../access/DataContextRelationshipQueryIT.java  |  15 +-
 .../cayenne/access/DataContextRollbackIT.java   |  16 +-
 .../DataContextSQLTemplateCompoundIT.java       |  11 +-
 .../access/DataContextSQLTemplateIT.java        |  14 +-
 .../DataContextSelectQuerySplitAliasesIT.java   |  15 +-
 .../access/DataContextSerializationIT.java      |  19 +-
 .../access/DataContextSharedCacheEmpiricIT.java |  14 +-
 .../access/DataContextSharedCacheIT.java        |  21 +-
 .../cayenne/access/DataContextValidationIT.java |  17 +-
 .../cayenne/access/DataDomainCallbacksIT.java   |  18 +-
 .../cayenne/access/DataDomainFiltersIT.java     |   3 +-
 .../org/apache/cayenne/access/DataDomainIT.java |   3 +-
 .../cayenne/access/DataDomainQueryActionIT.java |  22 +-
 .../org/apache/cayenne/access/DataNodeIT.java   |   3 +-
 .../cayenne/access/DataNodeQueriesIT.java       |  14 +-
 .../apache/cayenne/access/DataRowStoreIT.java   |   3 +-
 .../apache/cayenne/access/DataRowUtilsIT.java   |  14 +-
 .../apache/cayenne/access/DateTimeTypesIT.java  |  13 +-
 .../apache/cayenne/access/DbGeneratorIT.java    |   8 +-
 .../org/apache/cayenne/access/DbLoaderIT.java   |  13 +-
 .../cayenne/access/DbLoaderPartialIT.java       |  13 +-
 .../apache/cayenne/access/DeleteObjectIT.java   |  14 +-
 .../apache/cayenne/access/DeleteRulesIT.java    |  17 +-
 .../org/apache/cayenne/access/EmbeddingIT.java  |  12 +-
 .../cayenne/access/EntityInheritanceIT.java     |   3 +-
 .../java/org/apache/cayenne/access/EnumIT.java  |   9 +-
 .../cayenne/access/FlattenedArcKeyIT.java       |   3 +-
 .../cayenne/access/FlattenedPrefetchIT.java     |  15 +-
 .../FlattenedRelationshipInContextIT.java       |  14 +-
 .../cayenne/access/IdentityColumnsIT.java       |  15 +-
 .../cayenne/access/IncrementalFaultListIT.java  |   3 +-
 .../apache/cayenne/access/JointPrefetchIT.java  |  14 +-
 .../org/apache/cayenne/access/MiscTypesIT.java  |  17 +-
 .../access/NestedDataContextLocalCacheIT.java   |  18 +-
 .../access/NestedDataContextParentEventsIT.java |   3 +-
 .../NestedDataContextParentPeerEventsIT.java    |   3 +-
 .../access/NestedDataContextPeerEventsIT.java   |   3 +-
 .../cayenne/access/NestedDataContextReadIT.java |  14 +-
 .../access/NestedDataContextRollbackIT.java     |   3 +-
 .../access/NestedDataContextValidationIT.java   |  16 +-
 .../access/NestedDataContextWriteIT.java        |  14 +-
 .../access/NestedDataContext_DeadlockIT.java    |  14 +-
 .../apache/cayenne/access/NumericTypesIT.java   |  13 +-
 .../access/ObjectStoreDiffRetainingIT.java      |  14 +-
 .../apache/cayenne/access/ObjectStoreGCIT.java  |  16 +-
 .../apache/cayenne/access/ObjectStoreIT.java    |   3 +-
 .../cayenne/access/OptimisticLockingIT.java     |  12 +-
 .../access/PrefetchProcessorTreeBuilderIT.java  |   3 +-
 .../cayenne/access/PrimitiveAttributesIT.java   |  12 +-
 .../cayenne/access/QuotedIdentifiersIT.java     |  14 +-
 .../cayenne/access/ReturnTypesMappingIT.java    |  16 +-
 .../SimpleIdIncrementalFaultListDataRowsIT.java |  14 +-
 .../access/SimpleIdIncrementalFaultListIT.java  |  14 +-
 .../SimpleIdIncrementalFaultListPrefetchIT.java |  14 +-
 .../access/SingleTableInheritance1IT.java       |  16 +-
 .../access/SingleTableInheritanceIT.java        |  14 +-
 .../org/apache/cayenne/access/ToManyListIT.java |  16 +-
 .../cayenne/access/TransactionThreadIT.java     |  16 +-
 .../java/org/apache/cayenne/access/UUIDIT.java  |  11 +-
 .../cayenne/access/UserTransactionIT.java       |   3 +-
 .../cayenne/access/VerticalInheritanceIT.java   |  19 +-
 .../access/dbsync/SchemaUpdateStrategyBase.java |  18 +-
 .../access/dbsync/SchemaUpdateStrategyIT.java   |   4 +-
 .../ThrowOnPartialOrCreateSchemaStrategyIT.java |   4 +-
 .../dbsync/ThrowOnPartialSchemaStrategyIT.java  |   4 +-
 .../access/jdbc/BatchActionGeneratedIT.java     |   3 +-
 .../cayenne/access/jdbc/BatchActionIT.java      |   3 +-
 .../access/jdbc/BatchActionLockingIT.java       |   3 +-
 .../access/jdbc/SQLTemplateActionIT.java        |  14 +-
 .../cayenne/access/jdbc/SelectActionIT.java     |  16 +-
 .../batch/DefaultBatchTranslatorIT.java         |   3 +-
 .../batch/DeleteBatchTranslatorIT.java          |   3 +-
 .../batch/InsertBatchTranslatorIT.java          |   3 +-
 .../batch/SoftDeleteBatchTranslatorIT.java      |   3 +-
 .../batch/UpdateBatchTranslatorIT.java          |   3 +-
 .../ejbql/EJBQLSelectTranslatorIT.java          |   3 +-
 .../translator/select/OrderingTranslatorIT.java |  13 +-
 .../select/QualifierTranslatorIT.java           |  13 +-
 .../translator/select/QueryAssemblerIT.java     |  13 +-
 .../translator/select/SelectTranslatorIT.java   |  19 +-
 .../access/util/DefaultOperationObserverIT.java |   3 +-
 .../cayenne/ashwood/AshwoodEntitySorterIT.java  |  13 +-
 .../org/apache/cayenne/cache/QueryCacheIT.java  |   3 +-
 .../server/JNDIDataSourceFactoryIT.java         |   3 +-
 .../ServerRuntimeBuilder_InAction_IT.java       |  17 +-
 .../org/apache/cayenne/conn/PoolManagerIT.java  |   3 +-
 .../org/apache/cayenne/dba/AutoAdapterIT.java   |   3 +-
 .../cayenne/dba/ConcurrentPkGeneratorIT.java    |   3 +-
 .../org/apache/cayenne/dba/JdbcAdapterIT.java   |   3 +-
 .../apache/cayenne/dba/JdbcPkGeneratorIT.java   |  15 +-
 .../org/apache/cayenne/dba/PkGeneratorIT.java   |   9 +-
 .../org/apache/cayenne/dba/TypesMappingIT.java  |   3 +
 .../cayenne/dba/hsqldb/HSQLDBAdapterIT.java     |   3 +-
 .../cayenne/dba/mysql/MySQLAdapterIT.java       |   3 +-
 .../cayenne/dba/oracle/Oracle8AdapterIT.java    |   3 +-
 .../cayenne/dba/oracle/OracleAdapterIT.java     |   3 +-
 .../cayenne/dba/oracle/OraclePkGeneratorIT.java |   8 +-
 .../cayenne/dba/postgres/PostgresAdapterIT.java |   3 +-
 .../dba/sqlserver/SQLServerAdapterIT.java       |   3 +-
 .../dba/sqlserver/SQLServerSnifferIT.java       |   3 +-
 .../ejbql/EJBQLCompiledExpressionIT.java        |   3 +-
 .../exp/ExpressionFactory_InContextIT.java      |   3 +-
 .../cayenne/exp/Expression_InContextIT.java     |  18 +-
 .../cayenne/exp/ParsedExpQualifierCompatIT.java |  14 +-
 .../parser/ExpressionEvaluateInMemoryIT.java    |  15 +-
 .../cayenne/map/ClientEntityResolverIT.java     |   3 +-
 .../java/org/apache/cayenne/map/DbEntityIT.java |   3 +-
 .../apache/cayenne/map/DbRelationshipIT.java    |   8 +-
 .../java/org/apache/cayenne/map/EntityIT.java   |   3 +-
 .../map/EntityResolverClassDescriptorIT.java    |   3 +-
 .../map/EntityResolverGenericStackIT.java       |   3 +-
 .../apache/cayenne/map/EntityResolverIT.java    |   3 +-
 .../map/EntityResolverInheritanceIT.java        |   3 +-
 .../org/apache/cayenne/map/ObjEntityIT.java     |  16 +-
 .../apache/cayenne/map/ObjRelationshipIT.java   |   8 +-
 .../cayenne/merge/AddColumnToModelIT.java       |   4 +-
 .../cayenne/merge/CreateTableToModelIT.java     |   4 +-
 .../cayenne/merge/DropColumnToModelIT.java      |   4 +-
 .../merge/DropRelationshipToModelIT.java        |   4 +-
 .../cayenne/merge/DropTableToModelIT.java       |   4 +-
 .../org/apache/cayenne/merge/MergeCase.java     |  14 +-
 .../apache/cayenne/merge/MergerFactoryIT.java   |   4 +-
 .../cayenne/merge/SetAllowNullToDbIT.java       |   4 +-
 .../apache/cayenne/merge/SetNotNullToDbIT.java  |  19 +-
 .../cayenne/merge/SetPrimaryKeyToDbIT.java      |   4 +-
 .../apache/cayenne/merge/ValueForNullIT.java    |   4 +-
 .../org/apache/cayenne/query/EJBQLQueryIT.java  |  11 +-
 .../cayenne/query/EJBQLQueryNumericIT.java      |  10 +-
 .../cayenne/query/ProcedureQueryCacheKeyIT.java |   3 +-
 .../org/apache/cayenne/query/QueryChainIT.java  |   3 +-
 .../org/apache/cayenne/query/SQLSelectIT.java   |  12 +-
 .../cayenne/query/SQLTemplateCacheKeyIT.java    |   3 +-
 .../org/apache/cayenne/query/SQLTemplateIT.java |  14 +-
 .../org/apache/cayenne/query/SelectByIdIT.java  |  17 +-
 .../cayenne/query/SelectQueryCacheKeyIT.java    |   3 +-
 .../apache/cayenne/query/SelectQueryClobIT.java |  12 +-
 .../query/SelectQueryFetchLimitOrderingIT.java  |  14 +-
 .../org/apache/cayenne/query/SelectQueryIT.java |  12 +-
 .../SelectQueryPrefetchRouterActionIT.java      |   3 +-
 ...ryPrefetchRouterActionQualifiedEntityIT.java |   3 +-
 .../cayenne/query/SelectQueryReturnTypesIT.java |   8 +-
 .../cayenne/query/StatementFetchSizeIT.java     |   3 +-
 .../reflect/LifecycleCallbackRegistryIT.java    |   3 +-
 ...LifecycleCallbackRegistry_InheritanceIT.java |   3 +-
 .../reflect/MixedPersistenceStrategyIT.java     |  11 +-
 .../generic/DataObjectDescriptorFactoryIT.java  |   3 +-
 ...jectDescriptorFactory_InheritanceMapsIT.java |   3 +-
 .../cayenne/tx/DefaultTransactionManagerIT.java |   3 +-
 .../cayenne/unit/di/server/CayenneProjects.java |  79 ++++++
 .../cayenne/unit/di/server/DBCleaner.java       | 256 +++++++++++++++++++
 .../unit/di/server/DBCleanerProvider.java       |  40 +++
 .../cayenne/unit/di/server/SchemaBuilder.java   |   2 +-
 .../cayenne/unit/di/server/ServerCase.java      |  57 +----
 .../unit/di/server/ServerCaseModule.java        |   8 +-
 .../unit/di/server/ServerCaseSelfIT.java        |   4 +-
 .../org/apache/cayenne/unit/jira/CAY_115IT.java |  13 +-
 .../org/apache/cayenne/unit/jira/CAY_191IT.java |  17 +-
 .../org/apache/cayenne/unit/jira/CAY_194IT.java |   8 +-
 .../cayenne/util/DeepMergeOperationIT.java      |   3 +-
 .../util/DeepMergeOperationInheritanceIT.java   |   3 +-
 .../cayenne/util/EntityMergeSupportIT.java      |   4 +-
 .../cayenne/util/ShallowMergeOperationIT.java   |  14 +-
 .../cayenne/velocity/BindDirectiveIT.java       |  16 +-
 .../cayenne/velocity/ResultDirectiveIT.java     |  19 +-
 .../src/test/resources/cayenne-empty.xml        |   4 +
 cayenne-server/src/test/resources/empty.map.xml |   9 +
 .../src/test/resources/small-testmap.map.xml    | 225 ----------------
 308 files changed, 1457 insertions(+), 2318 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextCayenneIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextCayenneIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextCayenneIT.java
index 1063f56..dc89b9f 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextCayenneIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextCayenneIT.java
@@ -20,30 +20,21 @@ package org.apache.cayenne;
 
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SQLTemplate;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextCayenneIT extends ClientCase {
 
     @Inject
-    private DBHelper dbHelper;
-
-    @Inject
     private CayenneContext context;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-    }
-
     @Test
     public void testObjectForPK() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsIT.java
index 71f0114..fd8a569 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextClientChannelEventsIT.java
@@ -31,7 +31,9 @@ import org.apache.cayenne.testdo.mt.ClientMtTable4;
 import org.apache.cayenne.testdo.mt.ClientMtTable5;
 import org.apache.cayenne.unit.di.client.ClientCase;
 import org.apache.cayenne.unit.di.client.ClientRuntimeProperty;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
@@ -44,7 +46,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Tests peer context synchronization via ClientChannel events.
  */
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @ClientRuntimeProperty({
         Constants.ROP_CHANNEL_EVENTS_PROPERTY, "true"
 })
@@ -62,14 +64,8 @@ public class CayenneContextClientChannelEventsIT extends ClientCase {
     private TableHelper tMtTable5;
     private TableHelper tMtJoin45;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-        dbHelper.deleteAll("MT_JOIN45");
-        dbHelper.deleteAll("MT_TABLE4");
-        dbHelper.deleteAll("MT_TABLE5");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextDeleteRulesIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextDeleteRulesIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextDeleteRulesIT.java
index c43bac9..7c35650 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextDeleteRulesIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextDeleteRulesIT.java
@@ -25,6 +25,7 @@ import org.apache.cayenne.testdo.deleterules.ClientDeleteDeny;
 import org.apache.cayenne.testdo.deleterules.ClientDeleteNullify;
 import org.apache.cayenne.testdo.deleterules.ClientDeleteRule;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
@@ -34,7 +35,7 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ClientCase.DELETE_RULES_PROJECT)
+@UseServerRuntime(CayenneProjects.DELETE_RULES_PROJECT)
 public class CayenneContextDeleteRulesIT extends ClientCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextEJBQLIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextEJBQLIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextEJBQLIT.java
index e1e1351..7e1048c 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextEJBQLIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextEJBQLIT.java
@@ -24,7 +24,9 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.List;
@@ -32,7 +34,7 @@ import java.util.List;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextEJBQLIT extends ClientCase {
 
     @Inject
@@ -43,11 +45,8 @@ public class CayenneContextEJBQLIT extends ClientCase {
 
     private TableHelper tMtTable1;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextGraphDiffCompressorIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextGraphDiffCompressorIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextGraphDiffCompressorIT.java
index 487d03f..590ed85 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextGraphDiffCompressorIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextGraphDiffCompressorIT.java
@@ -25,12 +25,13 @@ import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.DataChannelSyncStats;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextGraphDiffCompressorIT extends ClientCase {
 
     @Inject(ClientCase.ROP_CLIENT_KEY)

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextIT.java
index 268a2cc..cfe37f2 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextIT.java
@@ -37,6 +37,7 @@ import org.apache.cayenne.remote.ClientConnection;
 import org.apache.cayenne.remote.ClientMessage;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.apache.cayenne.util.GenericResponse;
 import org.junit.Test;
@@ -59,7 +60,7 @@ import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextIT extends ClientCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextInheritanceIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextInheritanceIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextInheritanceIT.java
index 55ab00d..8fe01b2 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextInheritanceIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextInheritanceIT.java
@@ -26,7 +26,9 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable1Subclass1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 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.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextInheritanceIT extends ClientCase {
 
     @Inject
@@ -45,11 +47,8 @@ public class CayenneContextInheritanceIT extends ClientCase {
 
     private TableHelper tMtTable1;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns(
                 "TABLE1_ID",

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMapRelationshipIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMapRelationshipIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMapRelationshipIT.java
index 7ae2dee..00c1760 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMapRelationshipIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMapRelationshipIT.java
@@ -27,7 +27,9 @@ import org.apache.cayenne.testdo.map_to_many.ClientIdMapToMany;
 import org.apache.cayenne.testdo.map_to_many.ClientIdMapToManyTarget;
 import org.apache.cayenne.testdo.map_to_many.IdMapToMany;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Map;
@@ -37,7 +39,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MAP_TO_MANY_PROJECT)
+@UseServerRuntime(CayenneProjects.MAP_TO_MANY_PROJECT)
 public class CayenneContextMapRelationshipIT extends ClientCase {
 
     @Inject
@@ -49,11 +51,8 @@ public class CayenneContextMapRelationshipIT extends ClientCase {
     private TableHelper tMapToMany;
     private TableHelper tMapToManyTarget;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("ID_MAP_TO_MANY_TARGET");
-        dbHelper.deleteAll("ID_MAP_TO_MANY");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMapToMany = new TableHelper(dbHelper, "ID_MAP_TO_MANY");
         tMapToMany.setColumns("ID");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMeaningfulPKIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMeaningfulPKIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMeaningfulPKIT.java
index 28927c3..cd11d57 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMeaningfulPKIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMeaningfulPKIT.java
@@ -26,14 +26,16 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.meaningful_pk.ClientMeaningfulPk;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ClientCase.MEANINGFUL_PK_PROJECT)
+@UseServerRuntime(CayenneProjects.MEANINGFUL_PK_PROJECT)
 public class CayenneContextMeaningfulPKIT extends ClientCase {
 
     @Inject
@@ -44,10 +46,8 @@ public class CayenneContextMeaningfulPKIT extends ClientCase {
 
     private TableHelper tMeaningfulPK;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MEANINGFUL_PK");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMeaningfulPK = new TableHelper(dbHelper, "MEANINGFUL_PK");
         tMeaningfulPK.setColumns("PK");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMergeHandlerIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMergeHandlerIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMergeHandlerIT.java
index 31b5c80..00ca30e 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMergeHandlerIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextMergeHandlerIT.java
@@ -23,6 +23,7 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.graph.GraphEvent;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
@@ -32,7 +33,7 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextMergeHandlerIT extends ClientCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextNamedQueryCachingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextNamedQueryCachingIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextNamedQueryCachingIT.java
index 1aeae13..82178bf 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextNamedQueryCachingIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextNamedQueryCachingIT.java
@@ -26,7 +26,9 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Collections;
@@ -36,7 +38,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotSame;
 import static org.junit.Assert.assertSame;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextNamedQueryCachingIT extends ClientCase {
 
     @Inject
@@ -50,11 +52,8 @@ public class CayenneContextNamedQueryCachingIT extends ClientCase {
 
     private TableHelper tMtTable1;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPaginatedListCachingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPaginatedListCachingIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPaginatedListCachingIT.java
index a0a4efe..ea6ce4e 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPaginatedListCachingIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPaginatedListCachingIT.java
@@ -26,14 +26,16 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextPaginatedListCachingIT extends ClientCase {
 
     @Inject
@@ -44,11 +46,8 @@ public class CayenneContextPaginatedListCachingIT extends ClientCase {
 
     private TableHelper tMtTable1;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPrimitiveIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPrimitiveIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPrimitiveIT.java
index 0c402d5..ebfdf68 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPrimitiveIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextPrimitiveIT.java
@@ -27,7 +27,9 @@ import org.apache.cayenne.testdo.table_primitives.ClientTablePrimitives;
 import org.apache.cayenne.testdo.table_primitives.TablePrimitives;
 import org.apache.cayenne.unit.UnitDbAdapter;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Types;
@@ -37,7 +39,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.TABLE_PRIMITIVES_PROJECT)
+@UseServerRuntime(CayenneProjects.TABLE_PRIMITIVES_PROJECT)
 public class CayenneContextPrimitiveIT extends ClientCase {
 
     @Inject
@@ -51,10 +53,8 @@ public class CayenneContextPrimitiveIT extends ClientCase {
 
     private TableHelper tTablePrimitives;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("TABLE_PRIMITIVES");
-
+    @Before
+    public void testSetUp() throws Exception {
         int bool = accessStackAdapter.supportsBoolean() ? Types.BOOLEAN : Types.INTEGER;
         
         tTablePrimitives = new TableHelper(dbHelper, "TABLE_PRIMITIVES");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextReflexiveIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextReflexiveIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextReflexiveIT.java
index eec50ab..35b663d 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextReflexiveIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextReflexiveIT.java
@@ -25,10 +25,11 @@ import org.apache.cayenne.reflect.LifecycleCallbackRegistry;
 import org.apache.cayenne.testdo.reflexive.ClientReflexive;
 import org.apache.cayenne.testdo.reflexive.Reflexive;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
-@UseServerRuntime(ClientCase.REFLEXIVE_PROJECT)
+@UseServerRuntime(CayenneProjects.REFLEXIVE_PROJECT)
 public class CayenneContextReflexiveIT extends ClientCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRefreshQueryIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRefreshQueryIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRefreshQueryIT.java
index 2db0812..23d31b4 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRefreshQueryIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRefreshQueryIT.java
@@ -24,12 +24,14 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextRefreshQueryIT extends ClientCase {
 
     @Inject
@@ -41,11 +43,8 @@ public class CayenneContextRefreshQueryIT extends ClientCase {
     private TableHelper tMtTable1;
     private TableHelper tMtTable2;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRelationshipsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRelationshipsIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRelationshipsIT.java
index 8ae8850..a028306 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRelationshipsIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextRelationshipsIT.java
@@ -27,13 +27,15 @@ import org.apache.cayenne.testdo.mt.ClientMtTable2;
 import org.apache.cayenne.testdo.mt.MtTable1;
 import org.apache.cayenne.testdo.mt.MtTable2;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertSame;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextRelationshipsIT extends ClientCase {
 
     @Inject
@@ -48,14 +50,8 @@ public class CayenneContextRelationshipsIT extends ClientCase {
     private TableHelper tMtTable1;
     private TableHelper tMtTable2;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-        dbHelper.deleteAll("MT_JOIN45");
-        dbHelper.deleteAll("MT_TABLE4");
-        dbHelper.deleteAll("MT_TABLE5");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextSQLTemplateIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextSQLTemplateIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextSQLTemplateIT.java
index 555dbce..f58823f 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextSQLTemplateIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextSQLTemplateIT.java
@@ -20,30 +20,21 @@ package org.apache.cayenne;
 
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SQLTemplate;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextSQLTemplateIT extends ClientCase {
 
     @Inject
-    private DBHelper dbHelper;
-
-    @Inject
     private CayenneContext context;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-    }
-
     @Test
     public void testObjectRoot() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextServerDiffsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextServerDiffsIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextServerDiffsIT.java
index 7031d24..6fc3dc6 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextServerDiffsIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextServerDiffsIT.java
@@ -27,6 +27,7 @@ import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
 import org.apache.cayenne.testdo.mt.MtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
@@ -34,7 +35,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNull;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextServerDiffsIT extends ClientCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextValidationIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextValidationIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextValidationIT.java
index 299adef..c65dfa3 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextValidationIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextValidationIT.java
@@ -20,10 +20,10 @@
 package org.apache.cayenne;
 
 import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.apache.cayenne.validation.ValidationException;
 import org.junit.Test;
@@ -32,21 +32,12 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextValidationIT extends ClientCase {
 
     @Inject
-    private DBHelper dbHelper;
-
-    @Inject
     private CayenneContext context;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-    }
-
     @Test
     public void testValidate() throws Exception {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextWithDataContextIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextWithDataContextIT.java b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextWithDataContextIT.java
index 69676c7..3efab4d 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextWithDataContextIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/CayenneContextWithDataContextIT.java
@@ -38,7 +38,9 @@ import org.apache.cayenne.testdo.mt.MtTable1;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.sql.Types;
@@ -53,7 +55,7 @@ import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class CayenneContextWithDataContextIT extends ClientCase {
 
     @Inject
@@ -71,11 +73,8 @@ public class CayenneContextWithDataContextIT extends ClientCase {
     private TableHelper tMtTable1;
     private TableHelper tMtTable2;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextIT.java b/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextIT.java
index 0e489ab..53a3145 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextIT.java
@@ -26,12 +26,11 @@ import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.query.SortOrder;
 import org.apache.cayenne.remote.RemoteCayenneCase;
 import org.apache.cayenne.remote.service.LocalConnection;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -52,7 +51,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Tests nested object contexts
  */
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @RunWith(value = Parameterized.class)
 public class NestedCayenneContextIT extends RemoteCayenneCase {
 
@@ -60,9 +59,6 @@ public class NestedCayenneContextIT extends RemoteCayenneCase {
 	private ClientRuntime runtime;
 
 	@Inject
-	private DBHelper dbHelper;
-
-	@Inject
 	private DataChannelInterceptor queryInterceptor;
 
 	@Parameters
@@ -77,14 +73,6 @@ public class NestedCayenneContextIT extends RemoteCayenneCase {
 		super.serializationPolicy = serializationPolicy;
 	}
 
-	@Override
-	public void setUpAfterInjection() throws Exception {
-		super.setUpAfterInjection();
-
-		dbHelper.deleteAll("MT_TABLE2");
-		dbHelper.deleteAll("MT_TABLE1");
-	}
-
 	@Test
 	public void testChannels() {
 		ObjectContext child = runtime.newContext(clientContext);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextTooneIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextTooneIT.java b/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextTooneIT.java
index ddeebd1..28f9875 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextTooneIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/NestedCayenneContextTooneIT.java
@@ -29,7 +29,7 @@ import org.apache.cayenne.remote.service.LocalConnection;
 import org.apache.cayenne.testdo.toone.ClientTooneDep;
 import org.apache.cayenne.testdo.toone.ClientTooneMaster;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -43,7 +43,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 
-@UseServerRuntime(ClientCase.TOONE_PROJECT)
+@UseServerRuntime(CayenneProjects.TOONE_PROJECT)
 @RunWith(value = Parameterized.class)
 public class NestedCayenneContextTooneIT extends RemoteCayenneCase {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/PersistentObjectInContextIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/PersistentObjectInContextIT.java b/cayenne-client/src/test/java/org/apache/cayenne/PersistentObjectInContextIT.java
index b903d1c..95806f0 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/PersistentObjectInContextIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/PersistentObjectInContextIT.java
@@ -28,8 +28,10 @@ import org.apache.cayenne.testdo.mt.ClientMtTable2;
 import org.apache.cayenne.testdo.mt.MtTable1;
 import org.apache.cayenne.testdo.mt.MtTable2;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.apache.cayenne.util.PersistentObjectHolder;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.List;
@@ -40,7 +42,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class PersistentObjectInContextIT extends ClientCase {
 
     @Inject
@@ -52,11 +54,8 @@ public class PersistentObjectInContextIT extends ClientCase {
     private TableHelper tMtTable1;
     private TableHelper tMtTable2;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelIT.java b/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelIT.java
index dff353f..3a74163 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelIT.java
@@ -46,8 +46,10 @@ import org.apache.cayenne.testdo.mt.MtTable1;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.apache.cayenne.util.EqualsBuilder;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.List;
@@ -58,7 +60,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class ClientServerChannelIT extends ClientCase {
 
     @Inject
@@ -83,12 +85,8 @@ public class ClientServerChannelIT extends ClientCase {
     private TableHelper tMtTable2;
     private TableHelper tMtTable3;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-        dbHelper.deleteAll("MT_TABLE3");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryIT.java b/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryIT.java
index 110f39c..cc42dd3 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/access/ClientServerChannelQueryIT.java
@@ -32,9 +32,11 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.apache.cayenne.util.PersistentObjectHolder;
 import org.apache.cayenne.util.PersistentObjectList;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Collections;
@@ -45,7 +47,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class ClientServerChannelQueryIT extends ClientCase {
 
     @Inject(ClientCase.ROP_CLIENT_KEY)
@@ -60,11 +62,8 @@ public class ClientServerChannelQueryIT extends ClientCase {
     private TableHelper tMtTable1;
     private TableHelper tMtTable2;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/query/ClientExpressionIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/query/ClientExpressionIT.java b/cayenne-client/src/test/java/org/apache/cayenne/query/ClientExpressionIT.java
index ad3874d..b827b04 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/query/ClientExpressionIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/query/ClientExpressionIT.java
@@ -30,7 +30,9 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.ArrayList;
@@ -42,7 +44,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNotSame;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class ClientExpressionIT extends ClientCase {
     
     @Inject
@@ -53,12 +55,9 @@ public class ClientExpressionIT extends ClientCase {
     
     private TableHelper tMtTable1;
     private TableHelper tMtTable2;
-    
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-        
+
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
         

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionIT.java b/cayenne-client/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionIT.java
index b484f34..91b8ba8 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/query/ClientSelectQueryExpressionIT.java
@@ -26,14 +26,16 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class ClientSelectQueryExpressionIT extends ClientCase {
 
     @Inject
@@ -44,11 +46,8 @@ public class ClientSelectQueryExpressionIT extends ClientCase {
 
     private TableHelper tMtTable1;
 
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-
+    @Before
+    public void testSetUp() throws Exception {
         tMtTable1 = new TableHelper(dbHelper, "MT_TABLE1");
         tMtTable1.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java b/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java
index 7bd8a55..389e9f4 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java
@@ -25,16 +25,17 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.MtTable1;
 import org.apache.cayenne.testdo.mt.MtTable1Subclass1;
 import org.apache.cayenne.testdo.mt.MtTable1Subclass2;
-import org.apache.cayenne.unit.di.client.ClientCase;
+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;
 
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class SelectQueryAbstractEntityIT extends ServerCase {
     
     @Inject
@@ -44,11 +45,9 @@ public class SelectQueryAbstractEntityIT extends ServerCase {
     private DBHelper dbHelper;
     
     private TableHelper mtTable;
-    
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE1");
-        
+
+    @Before
+    public void testSetUp() throws Exception {
         mtTable = new TableHelper(dbHelper, "MT_TABLE1");
         mtTable.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1", "SUBCLASS_ATTRIBUTE1");
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/CayenneContextDeletionIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/CayenneContextDeletionIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/CayenneContextDeletionIT.java
index 98f89df..22e54b8 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/CayenneContextDeletionIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/CayenneContextDeletionIT.java
@@ -20,7 +20,7 @@ package org.apache.cayenne.remote;
 
 import org.apache.cayenne.remote.service.LocalConnection;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -32,7 +32,7 @@ import java.util.Collection;
 
 import static org.junit.Assert.assertNull;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @RunWith(value=Parameterized.class)
 public class CayenneContextDeletionIT extends RemoteCayenneCase {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsIT.java
index 805f730..4c3b79b 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/ClientChannelServerDiffsIT.java
@@ -32,6 +32,7 @@ import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
 import org.apache.cayenne.testdo.mt.MtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
@@ -44,7 +45,7 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class ClientChannelServerDiffsIT extends ClientCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/LightSuperClassIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/LightSuperClassIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/LightSuperClassIT.java
index c6e06dc..29818a2 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/LightSuperClassIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/LightSuperClassIT.java
@@ -19,14 +19,12 @@
 package org.apache.cayenne.remote;
 
 import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.RefreshQuery;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.remote.service.LocalConnection;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.persistent.Continent;
 import org.apache.cayenne.testdo.persistent.Country;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -39,15 +37,12 @@ import java.util.Collection;
 import static org.junit.Assert.assertEquals;
 
 /**
- * Test for entites that are implemented in same class on client and server
+ * Test for entities that are implemented in same class on client and server
  */
-@UseServerRuntime(ClientCase.PERSISTENT_PROJECT)
+@UseServerRuntime(CayenneProjects.PERSISTENT_PROJECT)
 @RunWith(value=Parameterized.class)
 public class LightSuperClassIT extends RemoteCayenneCase {
 
-    @Inject
-    private DBHelper dbHelper;
-
     private boolean server;
 
     @Parameters
@@ -65,14 +60,6 @@ public class LightSuperClassIT extends RemoteCayenneCase {
         this.server = server;
     }
 
-    @Override
-    public void setUpAfterInjection() throws Exception {
-        super.setUpAfterInjection();
-
-        dbHelper.deleteAll("CONTINENT");
-        dbHelper.deleteAll("COUNTRY");
-    }
-
     private ObjectContext createContext() {
         if (server) {
             return serverContext;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalIT.java
index aae5787..6c7085f 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalIT.java
@@ -25,7 +25,7 @@ import org.apache.cayenne.query.QueryCacheStrategy;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.remote.service.LocalConnection;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -39,7 +39,7 @@ import java.util.List;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @RunWith(value=Parameterized.class)
 public class NestedObjectContextLocalIT extends RemoteCayenneCase {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsIT.java
index b9d701b..2ebba83 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsIT.java
@@ -23,9 +23,8 @@ import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.configuration.rop.client.ClientRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.remote.service.LocalConnection;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -40,14 +39,11 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @RunWith(value=Parameterized.class)
 public class NestedObjectContextParentEventsIT extends RemoteCayenneCase {
 
     @Inject
-    private DBHelper dbHelper;
-    
-    @Inject
     private ClientRuntime runtime;
 
     @Parameters
@@ -63,14 +59,6 @@ public class NestedObjectContextParentEventsIT extends RemoteCayenneCase {
         super.serializationPolicy = serializationPolicy;
     }
 
-    @Override
-    public void setUpAfterInjection() throws Exception {
-        super.setUpAfterInjection();
-
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-    }
-
     @Test
     public void testParentUpdatedId() throws Exception {
         ObjectContext child = runtime.newContext(clientContext);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsIT.java
index b6974ba..e571574 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsIT.java
@@ -24,10 +24,9 @@ import org.apache.cayenne.ObjectId;
 import org.apache.cayenne.configuration.rop.client.ClientRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.remote.service.LocalConnection;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -42,16 +41,13 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @RunWith(value=Parameterized.class)
 public class NestedObjectContextPeerEventsIT extends RemoteCayenneCase {
 
     @Inject
     private ClientRuntime runtime;
     
-    @Inject
-    private DBHelper dbHelper;
-
     @Parameters
     public static Collection<Object[]> data() {
         return Arrays.asList(new Object[][]{
@@ -65,14 +61,6 @@ public class NestedObjectContextPeerEventsIT extends RemoteCayenneCase {
         super.serializationPolicy = serializationPolicy;
     }
 
-    @Override
-    public void setUpAfterInjection() throws Exception {
-        super.setUpAfterInjection();
-
-        dbHelper.deleteAll("MT_TABLE2");
-        dbHelper.deleteAll("MT_TABLE1");
-    }
-
     @Test
     public void testPeerObjectUpdatedTempOID() throws Exception {
         ObjectContext peer1 = runtime.newContext(clientContext);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackIT.java
index 7b35148..5474dcd 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackIT.java
@@ -23,7 +23,7 @@ import org.apache.cayenne.configuration.rop.client.ClientRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.remote.service.LocalConnection;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -36,7 +36,7 @@ import java.util.Collection;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @RunWith(value=Parameterized.class)
 public class NestedObjectContextRollbackIT extends RemoteCayenneCase {
     

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/ROPPrefetchToManyMapIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/ROPPrefetchToManyMapIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/ROPPrefetchToManyMapIT.java
index 1fa8c40..1f2caeb 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/ROPPrefetchToManyMapIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/ROPPrefetchToManyMapIT.java
@@ -24,12 +24,11 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.RefreshQuery;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.remote.service.LocalConnection;
-import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.map_to_many.ClientIdMapToMany;
 import org.apache.cayenne.testdo.map_to_many.ClientIdMapToManyTarget;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -41,14 +40,11 @@ import java.util.Collection;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ClientCase.MAP_TO_MANY_PROJECT)
+@UseServerRuntime(CayenneProjects.MAP_TO_MANY_PROJECT)
 @RunWith(value=Parameterized.class)
 public class ROPPrefetchToManyMapIT extends RemoteCayenneCase {
     
     @Inject
-    private DBHelper dbHelper;
-    
-    @Inject
     private DataChannelInterceptor queryInterceptor;
 
     @Parameters
@@ -64,12 +60,6 @@ public class ROPPrefetchToManyMapIT extends RemoteCayenneCase {
         super.serializationPolicy = serializationPolicy;
     }
 
-    @Override
-    public void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("ID_MAP_TO_MANY_TARGET");
-        dbHelper.deleteAll("ID_MAP_TO_MANY");
-    }
-
     @Test
     public void test() throws Exception {
         ObjectContext context = createROPContext();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/RelationshipChangeIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/RelationshipChangeIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/RelationshipChangeIT.java
index 3fba2bf..a13b5c3 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/RelationshipChangeIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/RelationshipChangeIT.java
@@ -21,7 +21,7 @@ package org.apache.cayenne.remote;
 import org.apache.cayenne.remote.service.LocalConnection;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -36,7 +36,7 @@ import static org.junit.Assert.assertEquals;
 /**
  * This is a test primarily for CAY-1118
  */
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @RunWith(value=Parameterized.class)
 public class RelationshipChangeIT extends RemoteCayenneCase {
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCallbacksIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCallbacksIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCallbacksIT.java
index afeb9fb..bbf7fdb 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCallbacksIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCallbacksIT.java
@@ -22,8 +22,9 @@ import org.apache.cayenne.LifecycleListener;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.remote.service.LocalConnection;
 import org.apache.cayenne.testdo.lifecycles.ClientLifecycles;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -34,7 +35,7 @@ import java.util.Collection;
 
 import static org.junit.Assert.assertEquals;
 
-@UseServerRuntime(ClientCase.LIFECYCLES_PROJECT)
+@UseServerRuntime(CayenneProjects.LIFECYCLES_PROJECT)
 @RunWith(value=Parameterized.class)
 public class RemoteCallbacksIT extends RemoteCayenneCase implements LifecycleListener {
     private int added, loaded, prePersisted, postPersisted, preRemoved, postRemoved, preUpdated, postUpdated;
@@ -52,8 +53,8 @@ public class RemoteCallbacksIT extends RemoteCayenneCase implements LifecycleLis
         super.serializationPolicy = serializationPolicy;
     }
 
-    @Override
-    public void setUpAfterInjection() throws Exception {
+    @Before
+    public void testSetUp() throws Exception {
         super.setUpAfterInjection();
         
         added = 0;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCayenneCase.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCayenneCase.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCayenneCase.java
index 07cca01..f86b7b1 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCayenneCase.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteCayenneCase.java
@@ -26,12 +26,16 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.event.DefaultEventManager;
 import org.apache.cayenne.unit.UnitLocalConnection;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.DBCleaner;
 
 public abstract class RemoteCayenneCase extends ClientCase {
 
     protected CayenneContext clientContext;
 
     @Inject
+    private DBCleaner dbCleaner;
+
+    @Inject
     protected DataContext serverContext;
 
     /**
@@ -41,6 +45,7 @@ public abstract class RemoteCayenneCase extends ClientCase {
 
     @Override
     public void setUpAfterInjection() throws Exception {
+        dbCleaner.clean();
         clientContext = createROPContext();
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteIncrementalFaultListIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteIncrementalFaultListIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteIncrementalFaultListIT.java
index be2f520..54859d3 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteIncrementalFaultListIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteIncrementalFaultListIT.java
@@ -31,7 +31,9 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.MtTable1;
 import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Before;
 import org.junit.Test;
 
 import java.util.Iterator;
@@ -44,7 +46,7 @@ import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 public class RemoteIncrementalFaultListIT extends ClientCase {
 
 	private static final int COUNT = 25;
@@ -59,11 +61,8 @@ public class RemoteIncrementalFaultListIT extends ClientCase {
 
 	private RemoteIncrementalFaultList list;
 
-	@Override
-	protected void setUpAfterInjection() throws Exception {
-		dbHelper.deleteAll("MT_TABLE2");
-		dbHelper.deleteAll("MT_TABLE1");
-
+	@Before
+	public void testSetUp() throws Exception {
 		tMTTable = new TableHelper(dbHelper, "MT_TABLE1");
 		tMTTable.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1",
 				"SERVER_ATTRIBUTE1");

http://git-wip-us.apache.org/repos/asf/cayenne/blob/368b4ac5/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteRollbackIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteRollbackIT.java b/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteRollbackIT.java
index 8c90da4..0fda177 100644
--- a/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteRollbackIT.java
+++ b/cayenne-client/src/test/java/org/apache/cayenne/remote/RemoteRollbackIT.java
@@ -22,7 +22,7 @@ import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.remote.service.LocalConnection;
 import org.apache.cayenne.testdo.mt.ClientMtTable1;
 import org.apache.cayenne.testdo.mt.ClientMtTable2;
-import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -38,7 +38,7 @@ import static org.junit.Assert.fail;
 /**
  * This is a test primarily for CAY-1103
  */
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+@UseServerRuntime(CayenneProjects.MULTI_TIER_PROJECT)
 @RunWith(value=Parameterized.class)
 public class RemoteRollbackIT extends RemoteCayenneCase {
 


Mime
View raw message