cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [11/11] cayenne git commit: Refactor TestMap Project
Date Wed, 12 Nov 2014 17:07:22 GMT
Refactor TestMap Project


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

Branch: refs/heads/master
Commit: 535ecb881e04a644f585aaa3adbcd39556c3cdac
Parents: d7178a8
Author: Savva Kolbechev <s.kolbachev@gmail.com>
Authored: Wed Nov 12 18:02:46 2014 +0300
Committer: Savva Kolbechev <s.kolbachev@gmail.com>
Committed: Wed Nov 12 18:02:46 2014 +0300

----------------------------------------------------------------------
 .../org/apache/cayenne/CayenneCompoundIT.java   | 149 ++++
 .../test/java/org/apache/cayenne/CayenneIT.java | 117 +--
 .../org/apache/cayenne/CompoundPkChangeIT.java  |   4 +-
 .../cayenne/access/DataContextBinaryPKIT.java   |   6 +-
 .../cayenne/access/DataContextBlobIT.java       |   4 +-
 .../cayenne/access/DataContextCharPKIT.java     |   4 +-
 .../cayenne/access/DataContextCharTypeIT.java   |   4 +-
 .../cayenne/access/DataContextClobIT.java       |   4 +-
 .../access/DataContextCompoundRelIT.java        |   6 +-
 ...ataContextDisjointByIdPrefetch_ExtrasIT.java |  17 +-
 ...extEJBQLDateTimeFunctionalExpressionsIT.java | 102 +++
 .../access/DataContextEJBQLDeleteIT.java        |  35 -
 .../access/DataContextEJBQLDeletePKIT.java      |  64 ++
 .../DataContextEJBQLFunctionalExpressions.java  | 430 ---------
 ...DataContextEJBQLFunctionalExpressionsIT.java | 295 +++++++
 .../DataContextEJBQLNumericalFunctionalIT.java  | 133 +++
 .../access/DataContextEJBQLQueryCompoundIT.java | 129 +++
 .../cayenne/access/DataContextEJBQLQueryIT.java |  93 --
 .../DataContextEJBQLUpdateCompoundIT.java       |  87 ++
 .../access/DataContextEJBQLUpdateIT.java        |  89 --
 .../DataContextEntityWithMeaningfulPKIT.java    |   6 +-
 .../DataContextExtendedTypeOperationsIT.java    |   6 +-
 .../cayenne/access/DataContextNoPkIT.java       |   4 +-
 .../access/DataContextPrefetchExtrasIT.java     |  10 +-
 .../access/DataContextProcedureQueryIT.java     |   8 +-
 .../DataContextSQLTemplateCompoundIT.java       | 105 +++
 .../access/DataContextSQLTemplateIT.java        |  82 +-
 .../apache/cayenne/access/DateTimeTypesIT.java  |   7 +-
 .../apache/cayenne/access/DbGeneratorIT.java    |   4 +-
 .../java/org/apache/cayenne/access/EnumIT.java  |   6 +-
 .../cayenne/access/IdentityColumnsIT.java       |  16 +-
 .../org/apache/cayenne/access/MiscTypesIT.java  |   8 +-
 .../apache/cayenne/access/NumericTypesIT.java   |  20 +-
 .../cayenne/access/PrimitiveAttributesIT.java   |   4 +-
 .../cayenne/access/ReturnTypesMappingIT.java    |  32 +-
 .../java/org/apache/cayenne/access/UUIDIT.java  |   6 +-
 .../access/jdbc/BatchActionGeneratedIT.java     |  70 ++
 .../cayenne/access/jdbc/BatchActionIT.java      |  11 -
 .../cayenne/access/jdbc/SelectActionIT.java     |   6 +-
 .../ServerRuntimeBuilder_InAction_IT.java       |   2 +-
 .../cayenne/dba/oracle/OracleAdapterIT.java     |   6 +-
 .../cayenne/exp/BooleanExpressionTest.java      |   2 +-
 .../apache/cayenne/map/MapLoaderLoadTest.java   |   6 +-
 .../org/apache/cayenne/map/ObjEntityIT.java     |   2 +-
 .../org/apache/cayenne/merge/MergeCase.java     |   2 +-
 .../org/apache/cayenne/query/EJBQLQueryIT.java  |  29 -
 .../cayenne/query/EJBQLQueryNumericIT.java      |  57 ++
 .../org/apache/cayenne/query/SQLSelectIT.java   |   2 +-
 .../org/apache/cayenne/query/SQLTemplateIT.java |   8 +-
 .../apache/cayenne/query/SelectQueryClobIT.java | 108 +++
 .../org/apache/cayenne/query/SelectQueryIT.java | 189 ----
 .../cayenne/query/SelectQueryReturnTypesIT.java | 149 ++++
 .../reflect/MixedPersistenceStrategyIT.java     |   6 +-
 .../cayenne/testdo/binary_pk/BinaryPKTest1.java |  28 +
 .../cayenne/testdo/binary_pk/BinaryPKTest2.java |  28 +
 .../testdo/binary_pk/auto/_BinaryPKTest1.java   |  48 +
 .../testdo/binary_pk/auto/_BinaryPKTest2.java   |  43 +
 .../testdo/compound/CharFkTestEntity.java       |  28 +
 .../testdo/compound/CharPkTestEntity.java       |  28 +
 .../testdo/compound/CompoundFkTestEntity.java   |  28 +
 .../testdo/compound/CompoundPkTestEntity.java   |  28 +
 .../testdo/compound/auto/_CharFkTestEntity.java |  43 +
 .../testdo/compound/auto/_CharPkTestEntity.java |  58 ++
 .../compound/auto/_CompoundFkTestEntity.java    |  43 +
 .../compound/auto/_CompoundPkTestEntity.java    |  69 ++
 .../testdo/date_time/CalendarEntity.java        |  28 +
 .../testdo/date_time/DateTestEntity.java        |  28 +
 .../testdo/date_time/auto/_CalendarEntity.java  |  32 +
 .../testdo/date_time/auto/_DateTestEntity.java  |  52 ++
 .../apache/cayenne/testdo/enum_test/Enum1.java  |  23 +
 .../cayenne/testdo/enum_test/EnumEntity.java    |  25 +
 .../testdo/enum_test/auto/_EnumEntity.java      |  31 +
 .../extended_type/ExtendedTypeEntity.java       |  25 +
 .../cayenne/testdo/extended_type/StringET1.java |  35 +
 .../extended_type/StringET1ExtendedType.java    |  62 ++
 .../extended_type/auto/_ExtendedTypeEntity.java |  31 +
 .../generated/GeneratedColumnCompKey.java       |  28 +
 .../generated/GeneratedColumnCompMaster.java    |  28 +
 .../testdo/generated/GeneratedColumnDep.java    |  28 +
 .../testdo/generated/GeneratedColumnTest2.java  |  28 +
 .../generated/GeneratedColumnTestEntity.java    |  28 +
 .../cayenne/testdo/generated/GeneratedF1.java   |  25 +
 .../cayenne/testdo/generated/GeneratedF2.java   |  25 +
 .../generated/auto/_GeneratedColumnCompKey.java |  45 +
 .../auto/_GeneratedColumnCompMaster.java        |  48 +
 .../generated/auto/_GeneratedColumnDep.java     |  43 +
 .../generated/auto/_GeneratedColumnTest2.java   |  30 +
 .../auto/_GeneratedColumnTestEntity.java        |  43 +
 .../testdo/generated/auto/_GeneratedF1.java     |  38 +
 .../testdo/generated/auto/_GeneratedF2.java     |  38 +
 .../horizontalinherit/AbstractSuperEntity.java  |  25 -
 .../testdo/horizontalinherit/SubEntity1.java    |  25 -
 .../testdo/horizontalinherit/SubEntity2.java    |  25 -
 .../testdo/horizontalinherit/SubEntity3.java    |  25 -
 .../auto/_AbstractSuperEntity.java              |  32 -
 .../horizontalinherit/auto/_SubEntity1.java     |  24 -
 .../horizontalinherit/auto/_SubEntity2.java     |  25 -
 .../horizontalinherit/auto/_SubEntity3.java     |  25 -
 .../AbstractSuperEntity.java                    |  25 +
 .../inheritance_horizontal/SubEntity1.java      |  25 +
 .../inheritance_horizontal/SubEntity2.java      |  25 +
 .../inheritance_horizontal/SubEntity3.java      |  25 +
 .../auto/_AbstractSuperEntity.java              |  32 +
 .../auto/_SubEntity1.java                       |  24 +
 .../auto/_SubEntity2.java                       |  25 +
 .../auto/_SubEntity3.java                       |  25 +
 .../cayenne/testdo/lob/BlobTestEntity.java      |  28 +
 .../cayenne/testdo/lob/ClobTestEntity.java      |  28 +
 .../cayenne/testdo/lob/ClobTestRelation.java    |  25 +
 .../testdo/lob/auto/_BlobTestEntity.java        |  30 +
 .../testdo/lob/auto/_ClobTestEntity.java        |  48 +
 .../testdo/lob/auto/_ClobTestRelation.java      |  53 ++
 .../testdo/meaningful_pk/MeaningfulPKDep.java   |  26 +
 .../testdo/meaningful_pk/MeaningfulPKTest1.java |  26 +
 .../meaningful_pk/auto/_MeaningfulPKDep.java    |  43 +
 .../meaningful_pk/auto/_MeaningfulPKTest1.java  |  58 ++
 .../cayenne/testdo/misc_types/ArraysEntity.java |  27 +
 .../testdo/misc_types/CharacterEntity.java      |  28 +
 .../testdo/misc_types/SerializableEntity.java   |  28 +
 .../testdo/misc_types/auto/_ArraysEntity.java   |  60 ++
 .../misc_types/auto/_CharacterEntity.java       |  30 +
 .../misc_types/auto/_SerializableEntity.java    |  31 +
 .../MixedPersistenceStrategy.java               |  35 +
 .../MixedPersistenceStrategy2.java              |  25 +
 .../auto/_MixedPersistenceStrategy.java         |  58 ++
 .../auto/_MixedPersistenceStrategy2.java        |  43 +
 .../cayenne/testdo/no_pk/NoPkTestEntity.java    |  28 +
 .../testdo/no_pk/auto/_NoPkTestEntity.java      |  29 +
 .../testdo/numeric_types/BigDecimalEntity.java  |  27 +
 .../testdo/numeric_types/BigIntegerEntity.java  |  27 +
 .../numeric_types/BitNumberTestEntity.java      |  28 +
 .../testdo/numeric_types/BitTestEntity.java     |  28 +
 .../testdo/numeric_types/BooleanTestEntity.java |  28 +
 .../testdo/numeric_types/DecimalPKTest1.java    |  28 +
 .../numeric_types/DecimalPKTestEntity.java      |  28 +
 .../testdo/numeric_types/LongEntity.java        |  28 +
 .../numeric_types/SmallintTestEntity.java       |  28 +
 .../testdo/numeric_types/TinyintTestEntity.java |  28 +
 .../numeric_types/auto/_BigDecimalEntity.java   |  32 +
 .../numeric_types/auto/_BigIntegerEntity.java   |  32 +
 .../auto/_BitNumberTestEntity.java              |  30 +
 .../numeric_types/auto/_BitTestEntity.java      |  30 +
 .../numeric_types/auto/_BooleanTestEntity.java  |  30 +
 .../numeric_types/auto/_DecimalPKTest1.java     |  40 +
 .../auto/_DecimalPKTestEntity.java              |  42 +
 .../testdo/numeric_types/auto/_LongEntity.java  |  30 +
 .../numeric_types/auto/_SmallintTestEntity.java |  30 +
 .../numeric_types/auto/_TinyintTestEntity.java  |  30 +
 .../testdo/primitive/PrimitivesTestEntity.java  |  25 +
 .../primitive/auto/_PrimitivesTestEntity.java   |  42 +
 .../testdo/return_types/ReturnTypesMap1.java    |  25 +
 .../testdo/return_types/ReturnTypesMap2.java    |  25 +
 .../return_types/ReturnTypesMapLobs1.java       |  25 +
 .../return_types/auto/_ReturnTypesMap1.java     | 193 +++++
 .../return_types/auto/_ReturnTypesMap2.java     |  60 ++
 .../return_types/auto/_ReturnTypesMapLobs1.java |  30 +
 .../cayenne/testdo/testmap/ArraysEntity.java    |  27 -
 .../org/apache/cayenne/testdo/testmap/Bag.java  |  27 -
 .../org/apache/cayenne/testdo/testmap/Ball.java |  27 -
 .../testdo/testmap/BigDecimalEntity.java        |  27 -
 .../testdo/testmap/BigIntegerEntity.java        |  27 -
 .../cayenne/testdo/testmap/BinaryPKTest1.java   |  28 -
 .../cayenne/testdo/testmap/BinaryPKTest2.java   |  28 -
 .../testdo/testmap/BitNumberTestEntity.java     |  28 -
 .../cayenne/testdo/testmap/BitTestEntity.java   |  28 -
 .../cayenne/testdo/testmap/BlobTestEntity.java  |  28 -
 .../testdo/testmap/BooleanTestEntity.java       |  28 -
 .../org/apache/cayenne/testdo/testmap/Box.java  |  25 -
 .../apache/cayenne/testdo/testmap/BoxInfo.java  |  25 -
 .../cayenne/testdo/testmap/CalendarEntity.java  |  28 -
 .../testdo/testmap/CharFkTestEntity.java        |  28 -
 .../testdo/testmap/CharPkTestEntity.java        |  28 -
 .../cayenne/testdo/testmap/CharacterEntity.java |  28 -
 .../cayenne/testdo/testmap/ClobTestEntity.java  |  28 -
 .../testdo/testmap/ClobTestRelation.java        |  25 -
 .../testdo/testmap/CompoundFkTestEntity.java    |  28 -
 .../testdo/testmap/CompoundPkTestEntity.java    |  28 -
 .../cayenne/testdo/testmap/DateTestEntity.java  |  28 -
 .../cayenne/testdo/testmap/DecimalPKTest1.java  |  26 -
 .../testdo/testmap/DecimalPKTestEntity.java     |  28 -
 .../apache/cayenne/testdo/testmap/Enum1.java    |  23 -
 .../cayenne/testdo/testmap/EnumEntity.java      |  25 -
 .../testdo/testmap/ExtendedTypeEntity.java      |  25 -
 .../testdo/testmap/GeneratedColumnCompKey.java  |  28 -
 .../testmap/GeneratedColumnCompMaster.java      |  28 -
 .../testdo/testmap/GeneratedColumnDep.java      |  28 -
 .../testdo/testmap/GeneratedColumnTest2.java    |  28 -
 .../testmap/GeneratedColumnTestEntity.java      |  28 -
 .../cayenne/testdo/testmap/GeneratedF1.java     |  25 -
 .../cayenne/testdo/testmap/GeneratedF2.java     |  25 -
 .../cayenne/testdo/testmap/LongEntity.java      |  28 -
 .../cayenne/testdo/testmap/MeaningfulPKDep.java |  24 -
 .../testdo/testmap/MeaningfulPKTest1.java       |  24 -
 .../testmap/MixedPersistenceStrategy.java       |  35 -
 .../testmap/MixedPersistenceStrategy2.java      |  25 -
 .../cayenne/testdo/testmap/NoPkTestEntity.java  |  28 -
 .../testdo/testmap/PrimitivesTestEntity.java    |  25 -
 .../cayenne/testdo/testmap/ReturnTypesMap1.java |  25 -
 .../cayenne/testdo/testmap/ReturnTypesMap2.java |  25 -
 .../testdo/testmap/ReturnTypesMapLobs1.java     |  25 -
 .../testdo/testmap/SerializableEntity.java      |  28 -
 .../testdo/testmap/SmallintTestEntity.java      |  28 -
 .../cayenne/testdo/testmap/StringET1.java       |  35 -
 .../testdo/testmap/StringET1ExtendedType.java   |  62 --
 .../apache/cayenne/testdo/testmap/Thing.java    |  25 -
 .../testdo/testmap/TinyintTestEntity.java       |  28 -
 .../cayenne/testdo/testmap/UuidPkEntity.java    |  25 -
 .../cayenne/testdo/testmap/UuidTestEntity.java  |  25 -
 .../testdo/testmap/auto/_ArraysEntity.java      |  60 --
 .../cayenne/testdo/testmap/auto/_Bag.java       |  68 --
 .../cayenne/testdo/testmap/auto/_Ball.java      |  66 --
 .../testdo/testmap/auto/_BigDecimalEntity.java  |  32 -
 .../testdo/testmap/auto/_BigIntegerEntity.java  |  32 -
 .../testdo/testmap/auto/_BinaryPKTest1.java     |  48 -
 .../testdo/testmap/auto/_BinaryPKTest2.java     |  43 -
 .../testmap/auto/_BitNumberTestEntity.java      |  30 -
 .../testdo/testmap/auto/_BitTestEntity.java     |  30 -
 .../testdo/testmap/auto/_BlobTestEntity.java    |  30 -
 .../testdo/testmap/auto/_BooleanTestEntity.java |  30 -
 .../cayenne/testdo/testmap/auto/_Box.java       |  84 --
 .../cayenne/testdo/testmap/auto/_BoxInfo.java   |  43 -
 .../testdo/testmap/auto/_CalendarEntity.java    |  32 -
 .../testdo/testmap/auto/_CharFkTestEntity.java  |  43 -
 .../testdo/testmap/auto/_CharPkTestEntity.java  |  58 --
 .../testdo/testmap/auto/_CharacterEntity.java   |  30 -
 .../testdo/testmap/auto/_ClobTestEntity.java    |  48 -
 .../testdo/testmap/auto/_ClobTestRelation.java  |  53 --
 .../testmap/auto/_CompoundFkTestEntity.java     |  43 -
 .../testmap/auto/_CompoundPkTestEntity.java     |  69 --
 .../testdo/testmap/auto/_DateTestEntity.java    |  52 --
 .../testdo/testmap/auto/_DecimalPKTest1.java    |  40 -
 .../testmap/auto/_DecimalPKTestEntity.java      |  42 -
 .../testdo/testmap/auto/_EnumEntity.java        |  31 -
 .../testmap/auto/_ExtendedTypeEntity.java       |  31 -
 .../testmap/auto/_GeneratedColumnCompKey.java   |  45 -
 .../auto/_GeneratedColumnCompMaster.java        |  48 -
 .../testmap/auto/_GeneratedColumnDep.java       |  43 -
 .../testmap/auto/_GeneratedColumnTest2.java     |  30 -
 .../auto/_GeneratedColumnTestEntity.java        |  43 -
 .../testdo/testmap/auto/_GeneratedF1.java       |  38 -
 .../testdo/testmap/auto/_GeneratedF2.java       |  38 -
 .../testdo/testmap/auto/_LongEntity.java        |  30 -
 .../testdo/testmap/auto/_MeaningfulPKDep.java   |  43 -
 .../testdo/testmap/auto/_MeaningfulPKTest1.java |  58 --
 .../testmap/auto/_MixedPersistenceStrategy.java |  58 --
 .../auto/_MixedPersistenceStrategy2.java        |  43 -
 .../testdo/testmap/auto/_NoPkTestEntity.java    |  29 -
 .../testmap/auto/_PrimitivesTestEntity.java     |  42 -
 .../testdo/testmap/auto/_ReturnTypesMap1.java   | 193 -----
 .../testdo/testmap/auto/_ReturnTypesMap2.java   |  60 --
 .../testmap/auto/_ReturnTypesMapLobs1.java      |  30 -
 .../testmap/auto/_SerializableEntity.java       |  31 -
 .../testmap/auto/_SmallintTestEntity.java       |  30 -
 .../cayenne/testdo/testmap/auto/_Thing.java     |  65 --
 .../testdo/testmap/auto/_TinyintTestEntity.java |  30 -
 .../testdo/testmap/auto/_UuidPkEntity.java      |  32 -
 .../testdo/testmap/auto/_UuidTestEntity.java    |  32 -
 .../org/apache/cayenne/testdo/things/Bag.java   |  27 +
 .../org/apache/cayenne/testdo/things/Ball.java  |  27 +
 .../org/apache/cayenne/testdo/things/Box.java   |  25 +
 .../apache/cayenne/testdo/things/BoxInfo.java   |  25 +
 .../org/apache/cayenne/testdo/things/Thing.java |  25 +
 .../apache/cayenne/testdo/things/auto/_Bag.java |  68 ++
 .../cayenne/testdo/things/auto/_Ball.java       |  66 ++
 .../apache/cayenne/testdo/things/auto/_Box.java |  84 ++
 .../cayenne/testdo/things/auto/_BoxInfo.java    |  43 +
 .../cayenne/testdo/things/auto/_Thing.java      |  65 ++
 .../cayenne/testdo/uuid/UuidPkEntity.java       |  25 +
 .../cayenne/testdo/uuid/UuidTestEntity.java     |  25 +
 .../cayenne/testdo/uuid/auto/_UuidPkEntity.java |  32 +
 .../testdo/uuid/auto/_UuidTestEntity.java       |  32 +
 .../cayenne/unit/HSQLDBUnitDbAdapter.java       |   6 +-
 .../apache/cayenne/unit/MySQLUnitDbAdapter.java |  12 +-
 .../cayenne/unit/OracleUnitDbAdapter.java       |   2 +-
 .../cayenne/unit/PostgresUnitDbAdapter.java     |   8 +-
 .../cayenne/unit/SybaseUnitDbAdapter.java       |  14 +-
 .../cayenne/unit/di/server/SchemaBuilder.java   |   7 +-
 .../cayenne/unit/di/server/ServerCase.java      |  16 +
 .../cayenne/velocity/ResultDirectiveIT.java     |   2 +-
 .../src/test/resources/binary-pk.map.xml        |  34 +
 .../src/test/resources/cayenne-binary-pk.xml    |   4 +
 .../src/test/resources/cayenne-compound.xml     |   4 +
 .../src/test/resources/cayenne-date-time.xml    |   4 +
 .../src/test/resources/cayenne-enum.xml         |   4 +
 .../test/resources/cayenne-extended-type.xml    |   4 +
 .../src/test/resources/cayenne-generated.xml    |   4 +
 .../src/test/resources/cayenne-lob.xml          |   4 +
 .../src/test/resources/cayenne-misc-types.xml   |   4 +
 .../cayenne-mixed-persistence-strategy.xml      |   4 +
 .../src/test/resources/cayenne-no-pk.xml        |   4 +
 .../test/resources/cayenne-numeric-types.xml    |   4 +
 .../src/test/resources/cayenne-primitive.xml    |   4 +
 .../src/test/resources/cayenne-return-types.xml |   4 +
 .../src/test/resources/cayenne-testmap.xml      |   2 +-
 .../src/test/resources/cayenne-things.xml       |   4 +
 .../src/test/resources/cayenne-uuid.xml         |   4 +
 .../src/test/resources/compound.map.xml         |  64 ++
 .../src/test/resources/date-time.map.xml        |  34 +
 cayenne-server/src/test/resources/enum.map.xml  |  18 +
 .../src/test/resources/extended-type.map.xml    |  18 +
 .../src/test/resources/generated.map.xml        |  93 ++
 cayenne-server/src/test/resources/lob.map.xml   |  46 +
 .../src/test/resources/meaningful-pk.map.xml    |  24 +
 .../src/test/resources/misc-types.map.xml       |  38 +
 .../mixed-persistence-strategy.map.xml          |  36 +
 cayenne-server/src/test/resources/no-pk.map.xml |  17 +
 .../src/test/resources/numeric-types.map.xml    |  79 ++
 .../src/test/resources/primitive.map.xml        |  20 +
 .../src/test/resources/return-types.map.xml     |  84 ++
 .../src/test/resources/small-testmap.map.xml    |  10 +-
 .../src/test/resources/testmap.map.xml          | 302 +++++++
 .../src/test/resources/things.map.xml           | 110 +++
 .../src/test/resources/tstmap.map.xml           | 868 -------------------
 cayenne-server/src/test/resources/uuid.map.xml  |  24 +
 .../src/test/resources/testmap.map.xml          |  88 +-
 .../src/test/resources/testmap-client.map.xml   |  88 +-
 .../src/test/resources/testmap.map.xml          |  88 +-
 317 files changed, 6744 insertions(+), 6133 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/CayenneCompoundIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CayenneCompoundIT.java b/cayenne-server/src/test/java/org/apache/cayenne/CayenneCompoundIT.java
new file mode 100644
index 0000000..0a0fa92
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/CayenneCompoundIT.java
@@ -0,0 +1,149 @@
+package org.apache.cayenne;
+
+import org.apache.cayenne.di.Inject;
+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.compound.CharPkTestEntity;
+import org.apache.cayenne.testdo.compound.CompoundPkTestEntity;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+@UseServerRuntime(ServerCase.COMPOUND_PROJECT)
+public class CayenneCompoundIT extends ServerCase {
+
+    @Inject
+    private ObjectContext context;
+
+    @Inject
+    protected DBHelper dbHelper;
+
+    protected TableHelper tCompoundPKTest;
+    protected TableHelper tCharPKTest;
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("COMPOUND_FK_TEST");
+        dbHelper.deleteAll("COMPOUND_PK_TEST");
+        dbHelper.deleteAll("CHAR_PK_TEST");
+
+        tCompoundPKTest = new TableHelper(dbHelper, "COMPOUND_PK_TEST");
+        tCompoundPKTest.setColumns("KEY1", "KEY2", "NAME");
+
+        tCharPKTest = new TableHelper(dbHelper, "CHAR_PK_TEST");
+        tCharPKTest.setColumns("PK_COL", "OTHER_COL");
+    }
+
+    private void createOneCompoundPK() throws Exception {
+        tCompoundPKTest.insert("PK1", "PK2", "BBB");
+    }
+
+    private void createOneCharPK() throws Exception {
+        tCharPKTest.insert("CPK", "AAAA");
+    }
+
+    @Test
+    public void testObjectForPKEntityMapCompound() throws Exception {
+        createOneCompoundPK();
+
+        Map<String, Object> pk = new HashMap<String, Object>();
+        pk.put(CompoundPkTestEntity.KEY1_PK_COLUMN, "PK1");
+        pk.put(CompoundPkTestEntity.KEY2_PK_COLUMN, "PK2");
+        Object object = Cayenne.objectForPK(context, CompoundPkTestEntity.class, pk);
+
+        assertNotNull(object);
+        assertTrue(object instanceof CompoundPkTestEntity);
+        assertEquals("BBB", ((CompoundPkTestEntity) object).getName());
+    }
+
+    @Test
+    public void testCompoundPKForObject() throws Exception {
+        createOneCompoundPK();
+
+        List<?> objects = context
+                .performQuery(new SelectQuery(CompoundPkTestEntity.class));
+        assertEquals(1, objects.size());
+        DataObject object = (DataObject) objects.get(0);
+
+        Map<String, Object> pk = Cayenne.compoundPKForObject(object);
+        assertNotNull(pk);
+        assertEquals(2, pk.size());
+        assertEquals("PK1", pk.get(CompoundPkTestEntity.KEY1_PK_COLUMN));
+        assertEquals("PK2", pk.get(CompoundPkTestEntity.KEY2_PK_COLUMN));
+    }
+
+    @Test
+    public void testIntPKForObjectFailureForCompound() throws Exception {
+        createOneCompoundPK();
+
+        List<?> objects = context
+                .performQuery(new SelectQuery(CompoundPkTestEntity.class));
+        assertEquals(1, objects.size());
+        DataObject object = (DataObject) objects.get(0);
+
+        try {
+            Cayenne.intPKForObject(object);
+            fail("intPKForObject must fail for compound key");
+        }
+        catch (CayenneRuntimeException ex) {
+            // expected
+        }
+    }
+
+    @Test
+    public void testIntPKForObjectFailureForNonNumeric() throws Exception {
+        createOneCharPK();
+
+        List<?> objects = context.performQuery(new SelectQuery(CharPkTestEntity.class));
+        assertEquals(1, objects.size());
+        DataObject object = (DataObject) objects.get(0);
+
+        try {
+            Cayenne.intPKForObject(object);
+            fail("intPKForObject must fail for non-numeric key");
+        }
+        catch (CayenneRuntimeException ex) {
+
+        }
+    }
+
+    @Test
+    public void testPKForObjectFailureForCompound() throws Exception {
+        createOneCompoundPK();
+
+        List<?> objects = context
+                .performQuery(new SelectQuery(CompoundPkTestEntity.class));
+        assertEquals(1, objects.size());
+        DataObject object = (DataObject) objects.get(0);
+
+        try {
+            Cayenne.pkForObject(object);
+            fail("pkForObject must fail for compound key");
+        }
+        catch (CayenneRuntimeException ex) {
+
+        }
+    }
+
+    @Test
+    public void testIntPKForObjectNonNumeric() throws Exception {
+        createOneCharPK();
+
+        List<?> objects = context.performQuery(new SelectQuery(CharPkTestEntity.class));
+        assertEquals(1, objects.size());
+        DataObject object = (DataObject) objects.get(0);
+
+        assertEquals("CPK", Cayenne.pkForObject(object));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/CayenneIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CayenneIT.java b/cayenne-server/src/test/java/org/apache/cayenne/CayenneIT.java
index d2ac438..008bb52 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/CayenneIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/CayenneIT.java
@@ -33,15 +33,12 @@ 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.testmap.Artist;
-import org.apache.cayenne.testdo.testmap.CharPkTestEntity;
-import org.apache.cayenne.testdo.testmap.CompoundPkTestEntity;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -50,7 +47,6 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class CayenneIT extends ServerCase {
@@ -63,8 +59,6 @@ public class CayenneIT extends ServerCase {
 
     protected TableHelper tArtist;
     protected TableHelper tPainting;
-    protected TableHelper tCompoundPKTest;
-    protected TableHelper tCharPKTest;
 
     @Override
     protected void setUpAfterInjection() throws Exception {
@@ -73,9 +67,6 @@ public class CayenneIT extends ServerCase {
         dbHelper.deleteAll("ARTIST_EXHIBIT");
         dbHelper.deleteAll("ARTIST_GROUP");
         dbHelper.deleteAll("ARTIST");
-        dbHelper.deleteAll("COMPOUND_FK_TEST");
-        dbHelper.deleteAll("COMPOUND_PK_TEST");
-        dbHelper.deleteAll("CHAR_PK_TEST");
 
         tArtist = new TableHelper(dbHelper, "ARTIST");
         tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
@@ -83,19 +74,6 @@ public class CayenneIT extends ServerCase {
         tPainting = new TableHelper(dbHelper, "PAINTING");
         tPainting.setColumns("PAINTING_ID", "ARTIST_ID", "PAINTING_TITLE");
 
-        tCompoundPKTest = new TableHelper(dbHelper, "COMPOUND_PK_TEST");
-        tCompoundPKTest.setColumns("KEY1", "KEY2", "NAME");
-
-        tCharPKTest = new TableHelper(dbHelper, "CHAR_PK_TEST");
-        tCharPKTest.setColumns("PK_COL", "OTHER_COL");
-    }
-
-    private void createOneCompoundPK() throws Exception {
-        tCompoundPKTest.insert("PK1", "PK2", "BBB");
-    }
-
-    private void createOneCharPK() throws Exception {
-        tCharPKTest.insert("CPK", "AAAA");
     }
 
     private void createOneArtist() throws Exception {
@@ -133,7 +111,7 @@ public class CayenneIT extends ServerCase {
 
         String sql = "SELECT count(1) AS X FROM ARTIST";
 
-        DataMap map = context.getEntityResolver().getDataMap("tstmap");
+        DataMap map = context.getEntityResolver().getDataMap("testmap");
         SQLTemplate query = new SQLTemplate(map, sql, false);
         query.setTemplate(
                 FrontBaseAdapter.class.getName(),
@@ -286,89 +264,6 @@ public class CayenneIT extends ServerCase {
     }
 
     @Test
-    public void testObjectForPKEntityMapCompound() throws Exception {
-        createOneCompoundPK();
-
-        Map<String, Object> pk = new HashMap<String, Object>();
-        pk.put(CompoundPkTestEntity.KEY1_PK_COLUMN, "PK1");
-        pk.put(CompoundPkTestEntity.KEY2_PK_COLUMN, "PK2");
-        Object object = Cayenne.objectForPK(context, CompoundPkTestEntity.class, pk);
-
-        assertNotNull(object);
-        assertTrue(object instanceof CompoundPkTestEntity);
-        assertEquals("BBB", ((CompoundPkTestEntity) object).getName());
-    }
-
-    @Test
-    public void testCompoundPKForObject() throws Exception {
-        createOneCompoundPK();
-
-        List<?> objects = context
-                .performQuery(new SelectQuery(CompoundPkTestEntity.class));
-        assertEquals(1, objects.size());
-        DataObject object = (DataObject) objects.get(0);
-
-        Map<String, Object> pk = Cayenne.compoundPKForObject(object);
-        assertNotNull(pk);
-        assertEquals(2, pk.size());
-        assertEquals("PK1", pk.get(CompoundPkTestEntity.KEY1_PK_COLUMN));
-        assertEquals("PK2", pk.get(CompoundPkTestEntity.KEY2_PK_COLUMN));
-    }
-
-    @Test
-    public void testIntPKForObjectFailureForCompound() throws Exception {
-        createOneCompoundPK();
-
-        List<?> objects = context
-                .performQuery(new SelectQuery(CompoundPkTestEntity.class));
-        assertEquals(1, objects.size());
-        DataObject object = (DataObject) objects.get(0);
-
-        try {
-            Cayenne.intPKForObject(object);
-            fail("intPKForObject must fail for compound key");
-        }
-        catch (CayenneRuntimeException ex) {
-            // expected
-        }
-    }
-
-    @Test
-    public void testIntPKForObjectFailureForNonNumeric() throws Exception {
-        createOneCharPK();
-
-        List<?> objects = context.performQuery(new SelectQuery(CharPkTestEntity.class));
-        assertEquals(1, objects.size());
-        DataObject object = (DataObject) objects.get(0);
-
-        try {
-            Cayenne.intPKForObject(object);
-            fail("intPKForObject must fail for non-numeric key");
-        }
-        catch (CayenneRuntimeException ex) {
-
-        }
-    }
-
-    @Test
-    public void testPKForObjectFailureForCompound() throws Exception {
-        createOneCompoundPK();
-
-        List<?> objects = context
-                .performQuery(new SelectQuery(CompoundPkTestEntity.class));
-        assertEquals(1, objects.size());
-        DataObject object = (DataObject) objects.get(0);
-
-        try {
-            Cayenne.pkForObject(object);
-            fail("pkForObject must fail for compound key");
-        }
-        catch (CayenneRuntimeException ex) {
-
-        }
-    }
-
-    @Test
     public void testIntPKForObject() throws Exception {
         createOneArtist();
 
@@ -390,14 +285,4 @@ public class CayenneIT extends ServerCase {
         assertEquals(new Long(33002), Cayenne.pkForObject(object));
     }
 
-    @Test
-    public void testIntPKForObjectNonNumeric() throws Exception {
-        createOneCharPK();
-
-        List<?> objects = context.performQuery(new SelectQuery(CharPkTestEntity.class));
-        assertEquals(1, objects.size());
-        DataObject object = (DataObject) objects.get(0);
-
-        assertEquals("CPK", Cayenne.pkForObject(object));
-    }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/CompoundPkChangeIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CompoundPkChangeIT.java b/cayenne-server/src/test/java/org/apache/cayenne/CompoundPkChangeIT.java
index f0035b0..dcdaa83 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/CompoundPkChangeIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/CompoundPkChangeIT.java
@@ -22,14 +22,14 @@ import org.apache.cayenne.access.DataContext;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.ObjectIdQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.testdo.testmap.CompoundPkTestEntity;
+import org.apache.cayenne.testdo.compound.CompoundPkTestEntity;
 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(ServerCase.COMPOUND_PROJECT)
 public class CompoundPkChangeIT extends ServerCase {
 
     private static final String key1v1 = "-key1-v1-";

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBinaryPKIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBinaryPKIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBinaryPKIT.java
index de99905..8dd8202 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBinaryPKIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBinaryPKIT.java
@@ -23,8 +23,8 @@ import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.testdo.testmap.BinaryPKTest1;
-import org.apache.cayenne.testdo.testmap.BinaryPKTest2;
+import org.apache.cayenne.testdo.binary_pk.BinaryPKTest1;
+import org.apache.cayenne.testdo.binary_pk.BinaryPKTest2;
 import org.apache.cayenne.unit.UnitDbAdapter;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
@@ -33,7 +33,7 @@ import org.junit.Test;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(ServerCase.BINARY_PK_PROJECT)
 public class DataContextBinaryPKIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBlobIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBlobIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBlobIT.java
index 6552b73..c482bd8 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBlobIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextBlobIT.java
@@ -23,7 +23,7 @@ import org.apache.cayenne.access.types.ByteArrayTypeTest;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.testdo.testmap.BlobTestEntity;
+import org.apache.cayenne.testdo.lob.BlobTestEntity;
 import org.apache.cayenne.unit.UnitDbAdapter;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
@@ -34,7 +34,7 @@ import java.util.List;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(ServerCase.LOB_PROJECT)
 public class DataContextBlobIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharPKIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharPKIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharPKIT.java
index 569b216..8d37950 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharPKIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharPKIT.java
@@ -23,7 +23,7 @@ import org.apache.cayenne.DataRow;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SQLTemplate;
 import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.testdo.testmap.CharPkTestEntity;
+import org.apache.cayenne.testdo.compound.CharPkTestEntity;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -33,7 +33,7 @@ import java.util.List;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(ServerCase.COMPOUND_PROJECT)
 public class DataContextCharPKIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
index 9c3779a..2b35330 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCharTypeIT.java
@@ -24,7 +24,7 @@ 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.testmap.ReturnTypesMap1;
+import org.apache.cayenne.testdo.return_types.ReturnTypesMap1;
 import org.apache.cayenne.unit.UnitDbAdapter;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
@@ -34,7 +34,7 @@ import java.util.List;
 
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(ServerCase.RETURN_TYPES_PROJECT)
 public class DataContextCharTypeIT extends ServerCase {
     
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextClobIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextClobIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextClobIT.java
index 4cd56eb..68e79bd 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextClobIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextClobIT.java
@@ -22,7 +22,7 @@ package org.apache.cayenne.access;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.testdo.testmap.ClobTestEntity;
+import org.apache.cayenne.testdo.lob.ClobTestEntity;
 import org.apache.cayenne.unit.UnitDbAdapter;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
@@ -33,7 +33,7 @@ import java.util.List;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(ServerCase.LOB_PROJECT)
 public class DataContextClobIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCompoundRelIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCompoundRelIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCompoundRelIT.java
index c9f4262..9c5932f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCompoundRelIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextCompoundRelIT.java
@@ -24,8 +24,8 @@ 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.testmap.CompoundFkTestEntity;
-import org.apache.cayenne.testdo.testmap.CompoundPkTestEntity;
+import org.apache.cayenne.testdo.compound.CompoundFkTestEntity;
+import org.apache.cayenne.testdo.compound.CompoundPkTestEntity;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
@@ -37,7 +37,7 @@ import static org.junit.Assert.assertEquals;
 /**
  * Testing relationships with compound keys.
  */
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(ServerCase.COMPOUND_PROJECT)
 public class DataContextCompoundRelIT extends ServerCase {
 
     @Inject

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasIT.java
index daa9acd..2d43bf5 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasIT.java
@@ -28,11 +28,11 @@ import org.apache.cayenne.query.PrefetchTreeNode;
 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.testmap.Bag;
-import org.apache.cayenne.testdo.testmap.Ball;
-import org.apache.cayenne.testdo.testmap.Box;
-import org.apache.cayenne.testdo.testmap.BoxInfo;
-import org.apache.cayenne.testdo.testmap.Thing;
+import org.apache.cayenne.testdo.things.Bag;
+import org.apache.cayenne.testdo.things.Ball;
+import org.apache.cayenne.testdo.things.Box;
+import org.apache.cayenne.testdo.things.BoxInfo;
+import org.apache.cayenne.testdo.things.Thing;
 import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.server.ServerCase;
@@ -50,7 +50,7 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+@UseServerRuntime(ServerCase.THINGS_PROJECT)
 public class DataContextDisjointByIdPrefetch_ExtrasIT extends ServerCase {
 
     @Inject
@@ -65,11 +65,6 @@ public class DataContextDisjointByIdPrefetch_ExtrasIT extends ServerCase {
     @Inject
     protected DataChannelInterceptor queryInterceptor;
 
-    protected TableHelper tBag;
-    protected TableHelper tBox;
-    protected TableHelper tBoxInfo;
-    protected TableHelper tBall;
-    protected TableHelper tThing;
     protected TableHelper tBoxThing;
 
     @Override

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDateTimeFunctionalExpressionsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDateTimeFunctionalExpressionsIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDateTimeFunctionalExpressionsIT.java
new file mode 100644
index 0000000..f42f730
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDateTimeFunctionalExpressionsIT.java
@@ -0,0 +1,102 @@
+package org.apache.cayenne.access;
+
+import org.apache.cayenne.ObjectContext;
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.query.EJBQLQuery;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.testdo.date_time.DateTestEntity;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.util.Calendar;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+@UseServerRuntime(ServerCase.DATE_TIME_PROJECT)
+public class DataContextEJBQLDateTimeFunctionalExpressionsIT extends ServerCase {
+
+    @Inject
+    protected DBHelper dbHelper;
+
+    @Inject
+    private ObjectContext context;
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("DATE_TEST");
+    }
+
+    @Test
+    public void testCURRENT_DATE() {
+
+        Calendar cal = Calendar.getInstance();
+        int year = cal.get(Calendar.YEAR);
+
+        DateTestEntity o1 = context.newObject(DateTestEntity.class);
+        cal.set(year - 3, 1, 1);
+        o1.setDateColumn(cal.getTime());
+
+        DateTestEntity o2 = context.newObject(DateTestEntity.class);
+        cal.set(year + 3, 1, 1);
+        o2.setDateColumn(cal.getTime());
+
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT d FROM DateTestEntity d WHERE d.dateColumn > CURRENT_DATE");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(o2));
+    }
+
+    @Test
+    public void testCURRENT_TIME() {
+
+        Calendar cal = Calendar.getInstance();
+        int year = cal.get(Calendar.YEAR);
+
+        DateTestEntity o1 = context.newObject(DateTestEntity.class);
+        cal.set(year, 1, 1, 0, 0, 0);
+        o1.setTimeColumn(cal.getTime());
+
+        DateTestEntity o2 = context.newObject(DateTestEntity.class);
+        cal.set(year, 1, 1, 23, 59, 59);
+        o2.setTimeColumn(cal.getTime());
+
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT d FROM DateTestEntity d WHERE d.timeColumn < CURRENT_TIME");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(o1));
+    }
+
+    @Test
+    public void testCURRENT_TIMESTAMP() {
+
+        Calendar cal = Calendar.getInstance();
+        int year = cal.get(Calendar.YEAR);
+        int month = cal.get(Calendar.MONTH);
+        int date = cal.get(Calendar.DATE);
+
+        DateTestEntity o1 = context.newObject(DateTestEntity.class);
+        cal.set(year, month, date, 0, 0, 0);
+        o1.setTimestampColumn(cal.getTime());
+
+        DateTestEntity o2 = context.newObject(DateTestEntity.class);
+        cal.set(year, month, date, 23, 59, 59);
+        o2.setTimestampColumn(cal.getTime());
+
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT d FROM DateTestEntity d WHERE d.timestampColumn < CURRENT_TIMESTAMP");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(o1));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteIT.java
index b364ea7..f29f219 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeleteIT.java
@@ -32,7 +32,6 @@ import org.apache.cayenne.unit.di.server.UseServerRuntime;
 import org.junit.Test;
 
 import java.sql.Types;
-import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -52,8 +51,6 @@ public class DataContextEJBQLDeleteIT extends ServerCase {
 
     protected TableHelper tPainting;
 
-    protected TableHelper tMeaningfulPKTest1Table;
-
     @Override
     protected void setUpAfterInjection() throws Exception {
         dbHelper.deleteAll("PAINTING_INFO");
@@ -61,8 +58,6 @@ public class DataContextEJBQLDeleteIT extends ServerCase {
         dbHelper.deleteAll("ARTIST_EXHIBIT");
         dbHelper.deleteAll("ARTIST_GROUP");
         dbHelper.deleteAll("ARTIST");
-        dbHelper.deleteAll("MEANINGFUL_PK_DEP");
-        dbHelper.deleteAll("MEANINGFUL_PK_TEST1");
 
         tPainting = new TableHelper(dbHelper, "PAINTING");
         tPainting.setColumns(
@@ -74,9 +69,6 @@ public class DataContextEJBQLDeleteIT extends ServerCase {
                 Types.BIGINT,
                 Types.VARCHAR,
                 Types.DECIMAL);
-
-        tMeaningfulPKTest1Table = new TableHelper(dbHelper, "MEANINGFUL_PK_TEST1");
-        tMeaningfulPKTest1Table.setColumns("PK_ATTRIBUTE", "DESCR");
     }
 
     protected void createPaintingsDataSet() throws Exception {
@@ -84,13 +76,6 @@ public class DataContextEJBQLDeleteIT extends ServerCase {
         tPainting.insert(33002, null, "P2", 5000);
     }
 
-    protected void createMeaningfulPKDataSet() throws Exception {
-
-        for (int i = 1; i <= 33; i++) {
-            tMeaningfulPKTest1Table.insert(i, "a" + i);
-        }
-    }
-
     @Test
     public void testDeleteNoIdVar() throws Exception {
         createPaintingsDataSet();
@@ -141,24 +126,4 @@ public class DataContextEJBQLDeleteIT extends ServerCase {
         assertNull(Cayenne.objectForPK(freshContext, Painting.class, 33002));
     }
 
-    @Test
-    public void testDeleteIdVar() throws Exception {
-
-        createMeaningfulPKDataSet();
-
-        EJBQLQuery q = new EJBQLQuery("select m.pkAttribute from MeaningfulPKTest1 m");
-
-        List<Integer> id = context.performQuery(q);
-
-        String ejbql = "delete from MeaningfulPKTest1 m WHERE m.pkAttribute in (:id)";
-
-        EJBQLQuery query = new EJBQLQuery(ejbql);
-        query.setParameter("id", id);
-        QueryResponse result = context.performGenericQuery(query);
-
-        int[] count = result.firstUpdateCount();
-        assertNotNull(count);
-        assertEquals(1, count.length);
-        assertEquals(33, count[0]);
-    }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeletePKIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeletePKIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeletePKIT.java
new file mode 100644
index 0000000..f532f13
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLDeletePKIT.java
@@ -0,0 +1,64 @@
+package org.apache.cayenne.access;
+
+import org.apache.cayenne.ObjectContext;
+import org.apache.cayenne.QueryResponse;
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.query.EJBQLQuery;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+@UseServerRuntime(ServerCase.MEANINGFUL_PK_PROJECT)
+public class DataContextEJBQLDeletePKIT extends ServerCase {
+
+    @Inject
+    protected ObjectContext context;
+
+    @Inject
+    protected DBHelper dbHelper;
+
+    protected TableHelper tMeaningfulPKTest1Table;
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("MEANINGFUL_PK_DEP");
+        dbHelper.deleteAll("MEANINGFUL_PK_TEST1");
+
+        tMeaningfulPKTest1Table = new TableHelper(dbHelper, "MEANINGFUL_PK_TEST1");
+        tMeaningfulPKTest1Table.setColumns("PK_ATTRIBUTE", "DESCR");
+    }
+
+    protected void createMeaningfulPKDataSet() throws Exception {
+        for (int i = 1; i <= 33; i++) {
+            tMeaningfulPKTest1Table.insert(i, "a" + i);
+        }
+    }
+
+    @Test
+    public void testDeleteIdVar() throws Exception {
+
+        createMeaningfulPKDataSet();
+
+        EJBQLQuery q = new EJBQLQuery("select m.pkAttribute from MeaningfulPKTest1 m");
+
+        List<Integer> id = context.performQuery(q);
+
+        String ejbql = "delete from MeaningfulPKTest1 m WHERE m.pkAttribute in (:id)";
+
+        EJBQLQuery query = new EJBQLQuery(ejbql);
+        query.setParameter("id", id);
+        QueryResponse result = context.performGenericQuery(query);
+
+        int[] count = result.firstUpdateCount();
+        assertNotNull(count);
+        assertEquals(1, count.length);
+        assertEquals(33, count[0]);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressions.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressions.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressions.java
deleted file mode 100644
index 9c4ae2e..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressions.java
+++ /dev/null
@@ -1,430 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.access;
-
-import org.apache.cayenne.Cayenne;
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.query.EJBQLQuery;
-import org.apache.cayenne.query.QueryChain;
-import org.apache.cayenne.query.SQLTemplate;
-import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.testdo.testmap.Artist;
-import org.apache.cayenne.testdo.testmap.BigDecimalEntity;
-import org.apache.cayenne.testdo.testmap.BigIntegerEntity;
-import org.apache.cayenne.testdo.testmap.DateTestEntity;
-import org.apache.cayenne.testdo.testmap.Painting;
-import org.apache.cayenne.unit.UnitDbAdapter;
-import org.apache.cayenne.unit.di.server.ServerCase;
-import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.junit.Test;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Calendar;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-// TODO: renamed as it fails on DB's like Derby. See CAY-1480. 
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
-public class DataContextEJBQLFunctionalExpressions extends ServerCase {
-
-    @Inject
-    protected DBHelper dbHelper;
-
-    @Inject
-    private ObjectContext context;
-
-    @Inject
-    private UnitDbAdapter accessStackAdapter;
-
-    @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("BIGDECIMAL_ENTITY");
-        dbHelper.deleteAll("BIGINTEGER_ENTITY");
-        dbHelper.deleteAll("DATE_TEST");
-    }
-
-    @Test
-    public void testCURRENT_DATE() {
-
-        Calendar cal = Calendar.getInstance();
-        int year = cal.get(Calendar.YEAR);
-
-        DateTestEntity o1 = context.newObject(DateTestEntity.class);
-        cal.set(year - 3, 1, 1);
-        o1.setDateColumn(cal.getTime());
-
-        DateTestEntity o2 = context.newObject(DateTestEntity.class);
-        cal.set(year + 3, 1, 1);
-        o2.setDateColumn(cal.getTime());
-
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT d FROM DateTestEntity d WHERE d.dateColumn > CURRENT_DATE");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(o2));
-    }
-
-    @Test
-    public void testCURRENT_TIME() {
-
-        Calendar cal = Calendar.getInstance();
-        int year = cal.get(Calendar.YEAR);
-
-        DateTestEntity o1 = context.newObject(DateTestEntity.class);
-        cal.set(year, 1, 1, 0, 0, 0);
-        o1.setTimeColumn(cal.getTime());
-
-        DateTestEntity o2 = context.newObject(DateTestEntity.class);
-        cal.set(year, 1, 1, 23, 59, 59);
-        o2.setTimeColumn(cal.getTime());
-
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT d FROM DateTestEntity d WHERE d.timeColumn < CURRENT_TIME");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(o1));
-    }
-
-    @Test
-    public void testCURRENT_TIMESTAMP() {
-
-        Calendar cal = Calendar.getInstance();
-        int year = cal.get(Calendar.YEAR);
-        int month = cal.get(Calendar.MONTH);
-        int date = cal.get(Calendar.DATE);
-
-        DateTestEntity o1 = context.newObject(DateTestEntity.class);
-        cal.set(year, month, date, 0, 0, 0);
-        o1.setTimestampColumn(cal.getTime());
-
-        DateTestEntity o2 = context.newObject(DateTestEntity.class);
-        cal.set(year, month, date, 23, 59, 59);
-        o2.setTimestampColumn(cal.getTime());
-
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT d FROM DateTestEntity d WHERE d.timestampColumn < CURRENT_TIMESTAMP");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(o1));
-    }
-
-    @Test
-    public void testABS() {
-
-        BigDecimalEntity o1 = context.newObject(BigDecimalEntity.class);
-        o1.setBigDecimalField(new BigDecimal("4.1"));
-
-        BigDecimalEntity o2 = context.newObject(BigDecimalEntity.class);
-        o2.setBigDecimalField(new BigDecimal("-5.1"));
-
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT d FROM BigDecimalEntity d WHERE ABS(d.bigDecimalField) > 4.5");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(o2));
-    }
-
-    @Test
-    public void testSQRT() {
-
-        BigDecimalEntity o1 = context.newObject(BigDecimalEntity.class);
-        o1.setBigDecimalField(new BigDecimal("9"));
-
-        BigDecimalEntity o2 = context.newObject(BigDecimalEntity.class);
-        o2.setBigDecimalField(new BigDecimal("16"));
-
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT d FROM BigDecimalEntity d WHERE SQRT(d.bigDecimalField) > 3.1");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(o2));
-    }
-
-    @Test
-    public void testMOD() {
-
-        BigIntegerEntity o1 = context.newObject(BigIntegerEntity.class);
-        o1.setBigIntegerField(new BigInteger("9"));
-
-        BigIntegerEntity o2 = context.newObject(BigIntegerEntity.class);
-        o2.setBigIntegerField(new BigInteger("10"));
-
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT d FROM BigIntegerEntity d WHERE MOD(d.bigIntegerField, 4) = 2");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(o2));
-    }
-
-    @Test
-    public void testSIZE() {
-
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("a1");
-
-        Artist a2 = context.newObject(Artist.class);
-        a2.setArtistName("a2");
-
-        Painting p12 = context.newObject(Painting.class);
-        p12.setPaintingTitle("p12");
-        a2.addToPaintingArray(p12);
-        Painting p22 = context.newObject(Painting.class);
-        p22.setPaintingTitle("p22");
-        a2.addToPaintingArray(p22);
-
-        context.commitChanges();
-
-        // this fails:
-        // EJBQLQuery query = new EJBQLQuery(
-        // "SELECT d FROM Artist d WHERE SIZE(d.paintingArray) = 2");
-        // List<?> objects = context.performQuery(query);
-        // assertEquals(1, objects.size());
-        // assertTrue(objects.contains(a2));
-        //
-        // EJBQLQuery query2 = new EJBQLQuery(
-        // "SELECT d FROM Artist d WHERE SIZE(d.paintingArray) = 0");
-        // List<?> objects2 = context.performQuery(query2);
-        // assertEquals(1, objects2.size());
-        // assertTrue(objects2.contains(a1));
-    }
-
-    @Test
-    public void testCONCAT() {
-
-        Painting a1 = context.newObject(Painting.class);
-        a1.setPaintingTitle("a1");
-
-        Painting a2 = context.newObject(Painting.class);
-        a2.setPaintingTitle("a2");
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT a FROM Painting a WHERE CONCAT(a.paintingTitle, a.paintingTitle) = 'a1a1'");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(a1));
-    }
-
-    @Test
-    public void testSUBSTRING() {
-
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("12345678");
-
-        Artist a2 = context.newObject(Artist.class);
-        a2.setArtistName("abcdefg");
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE SUBSTRING(a.artistName, 2, 3) = 'bcd'");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(a2));
-    }
-
-    @Test
-    public void testLOWER() {
-
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("ABCDEFG");
-
-        Artist a2 = context.newObject(Artist.class);
-        a2.setArtistName("abcdefg");
-        context.commitChanges();
-
-        Artist a3 = context.newObject(Artist.class);
-        a3.setArtistName("Xabcdefg");
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE LOWER(a.artistName) = 'abcdefg'");
-        List<?> objects = context.performQuery(query);
-        assertEquals(2, objects.size());
-        assertTrue(objects.contains(a1));
-        assertTrue(objects.contains(a2));
-    }
-
-    @Test
-    public void testUPPER() {
-
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("ABCDEFG");
-
-        Artist a2 = context.newObject(Artist.class);
-        a2.setArtistName("abcdefg");
-        context.commitChanges();
-
-        Artist a3 = context.newObject(Artist.class);
-        a3.setArtistName("Xabcdefg");
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE UPPER(a.artistName) = UPPER('abcdefg')");
-        List<?> objects = context.performQuery(query);
-        assertEquals(2, objects.size());
-        assertTrue(objects.contains(a1));
-        assertTrue(objects.contains(a2));
-    }
-
-    @Test
-    public void testLENGTH() {
-
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("1234567");
-
-        Artist a2 = context.newObject(Artist.class);
-        a2.setArtistName("1234567890");
-
-        Artist a3 = context.newObject(Artist.class);
-        a3.setArtistName("1234567890-=");
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE LENGTH(a.artistName) > 7");
-        List<?> objects = context.performQuery(query);
-        assertEquals(2, objects.size());
-        assertTrue(objects.contains(a3));
-        assertTrue(objects.contains(a2));
-    }
-
-    @Test
-    public void testLOCATE() {
-
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("___A___");
-
-        Artist a2 = context.newObject(Artist.class);
-        a2.setArtistName("_A_____");
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE LOCATE('A', a.artistName) = 2");
-        List<?> objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(a2));
-    }
-
-    @Test
-    public void testTRIM() {
-
-        // insert via a SQL template to prevent adapter trimming and such...
-        QueryChain inserts = new QueryChain();
-        inserts.addQuery(new SQLTemplate(
-                Artist.class,
-                "INSERT INTO ARTIST (ARTIST_ID,ARTIST_NAME) VALUES(1, '  A')"));
-        inserts.addQuery(new SQLTemplate(
-                Artist.class,
-                "INSERT INTO ARTIST (ARTIST_ID,ARTIST_NAME) VALUES(2, 'A  ')"));
-        context.performGenericQuery(inserts);
-
-        Artist a1 = Cayenne.objectForPK(context, Artist.class, 1);
-        Artist a2 = Cayenne.objectForPK(context, Artist.class, 2);
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE TRIM(a.artistName) = 'A'");
-        List<?> objects = context.performQuery(query);
-        assertEquals(2, objects.size());
-        assertTrue(objects.contains(a1));
-        assertTrue(objects.contains(a2));
-
-        query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE TRIM(LEADING FROM a.artistName) = 'A'");
-        objects = context.performQuery(query);
-        // this is fuzzy cause some DB trim trailing data by default
-        assertTrue(objects.size() == 1 || objects.size() == 2);
-        assertTrue(objects.contains(a1));
-
-        query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE TRIM(TRAILING FROM a.artistName) = 'A'");
-        objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(a2));
-
-        query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE TRIM(BOTH FROM a.artistName) = 'A'");
-        objects = context.performQuery(query);
-        assertEquals(2, objects.size());
-        assertTrue(objects.contains(a1));
-        assertTrue(objects.contains(a2));
-
-    }
-
-    @Test
-    public void testTRIMChar() {
-
-        if (!accessStackAdapter.supportsTrimChar()) {
-            return;
-        }
-
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("XXXA");
-
-        Artist a2 = context.newObject(Artist.class);
-        a2.setArtistName("AXXX");
-        context.commitChanges();
-
-        EJBQLQuery query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE TRIM('X' FROM a.artistName) = 'A'");
-        List<?> objects = context.performQuery(query);
-        assertEquals(2, objects.size());
-        assertTrue(objects.contains(a1));
-        assertTrue(objects.contains(a2));
-
-        query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE TRIM(LEADING 'X' FROM a.artistName) = 'A'");
-        objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(a1));
-
-        query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE TRIM(TRAILING 'X' FROM a.artistName) = 'A'");
-        objects = context.performQuery(query);
-        assertEquals(1, objects.size());
-        assertTrue(objects.contains(a2));
-
-        query = new EJBQLQuery(
-                "SELECT a FROM Artist a WHERE TRIM(BOTH 'X' FROM a.artistName) = 'A'");
-        objects = context.performQuery(query);
-        assertEquals(2, objects.size());
-        assertTrue(objects.contains(a1));
-        assertTrue(objects.contains(a2));
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressionsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressionsIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressionsIT.java
new file mode 100644
index 0000000..cd75d76
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLFunctionalExpressionsIT.java
@@ -0,0 +1,295 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.access;
+
+import org.apache.cayenne.Cayenne;
+import org.apache.cayenne.ObjectContext;
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.query.EJBQLQuery;
+import org.apache.cayenne.query.QueryChain;
+import org.apache.cayenne.query.SQLTemplate;
+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.UnitDbAdapter;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+// TODO: renamed as it fails on DB's like Derby. See CAY-1480. 
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class DataContextEJBQLFunctionalExpressionsIT extends ServerCase {
+
+    @Inject
+    protected DBHelper dbHelper;
+
+    @Inject
+    private ObjectContext context;
+
+    @Inject
+    private UnitDbAdapter accessStackAdapter;
+
+    @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 testSIZE() {
+
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("a1");
+
+        Artist a2 = context.newObject(Artist.class);
+        a2.setArtistName("a2");
+
+        Painting p12 = context.newObject(Painting.class);
+        p12.setPaintingTitle("p12");
+        a2.addToPaintingArray(p12);
+        Painting p22 = context.newObject(Painting.class);
+        p22.setPaintingTitle("p22");
+        a2.addToPaintingArray(p22);
+
+        context.commitChanges();
+
+        // this fails:
+        // EJBQLQuery query = new EJBQLQuery(
+        // "SELECT d FROM Artist d WHERE SIZE(d.paintingArray) = 2");
+        // List<?> objects = context.performQuery(query);
+        // assertEquals(1, objects.size());
+        // assertTrue(objects.contains(a2));
+        //
+        // EJBQLQuery query2 = new EJBQLQuery(
+        // "SELECT d FROM Artist d WHERE SIZE(d.paintingArray) = 0");
+        // List<?> objects2 = context.performQuery(query2);
+        // assertEquals(1, objects2.size());
+        // assertTrue(objects2.contains(a1));
+    }
+
+    @Test
+    public void testCONCAT() {
+
+        Painting a1 = context.newObject(Painting.class);
+        a1.setPaintingTitle("a1");
+
+        Painting a2 = context.newObject(Painting.class);
+        a2.setPaintingTitle("a2");
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT a FROM Painting a WHERE CONCAT(a.paintingTitle, a.paintingTitle) = 'a1a1'");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(a1));
+    }
+
+    @Test
+    public void testSUBSTRING() {
+
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("12345678");
+
+        Artist a2 = context.newObject(Artist.class);
+        a2.setArtistName("abcdefg");
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE SUBSTRING(a.artistName, 2, 3) = 'bcd'");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(a2));
+    }
+
+    @Test
+    public void testLOWER() {
+
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("ABCDEFG");
+
+        Artist a2 = context.newObject(Artist.class);
+        a2.setArtistName("abcdefg");
+        context.commitChanges();
+
+        Artist a3 = context.newObject(Artist.class);
+        a3.setArtistName("Xabcdefg");
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE LOWER(a.artistName) = 'abcdefg'");
+        List<?> objects = context.performQuery(query);
+        assertEquals(2, objects.size());
+        assertTrue(objects.contains(a1));
+        assertTrue(objects.contains(a2));
+    }
+
+    @Test
+    public void testUPPER() {
+
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("ABCDEFG");
+
+        Artist a2 = context.newObject(Artist.class);
+        a2.setArtistName("abcdefg");
+        context.commitChanges();
+
+        Artist a3 = context.newObject(Artist.class);
+        a3.setArtistName("Xabcdefg");
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE UPPER(a.artistName) = UPPER('abcdefg')");
+        List<?> objects = context.performQuery(query);
+        assertEquals(2, objects.size());
+        assertTrue(objects.contains(a1));
+        assertTrue(objects.contains(a2));
+    }
+
+    @Test
+    public void testLENGTH() {
+
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("1234567");
+
+        Artist a2 = context.newObject(Artist.class);
+        a2.setArtistName("1234567890");
+
+        Artist a3 = context.newObject(Artist.class);
+        a3.setArtistName("1234567890-=");
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE LENGTH(a.artistName) > 7");
+        List<?> objects = context.performQuery(query);
+        assertEquals(2, objects.size());
+        assertTrue(objects.contains(a3));
+        assertTrue(objects.contains(a2));
+    }
+
+    @Test
+    public void testLOCATE() {
+
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("___A___");
+
+        Artist a2 = context.newObject(Artist.class);
+        a2.setArtistName("_A_____");
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE LOCATE('A', a.artistName) = 2");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(a2));
+    }
+
+    @Test
+    public void testTRIM() {
+
+        // insert via a SQL template to prevent adapter trimming and such...
+        QueryChain inserts = new QueryChain();
+        inserts.addQuery(new SQLTemplate(
+                Artist.class,
+                "INSERT INTO ARTIST (ARTIST_ID,ARTIST_NAME) VALUES(1, '  A')"));
+        inserts.addQuery(new SQLTemplate(
+                Artist.class,
+                "INSERT INTO ARTIST (ARTIST_ID,ARTIST_NAME) VALUES(2, 'A  ')"));
+        context.performGenericQuery(inserts);
+
+        Artist a1 = Cayenne.objectForPK(context, Artist.class, 1);
+        Artist a2 = Cayenne.objectForPK(context, Artist.class, 2);
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE TRIM(a.artistName) = 'A'");
+        List<?> objects = context.performQuery(query);
+        assertEquals(2, objects.size());
+        assertTrue(objects.contains(a1));
+        assertTrue(objects.contains(a2));
+
+        query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE TRIM(LEADING FROM a.artistName) = 'A'");
+        objects = context.performQuery(query);
+        // this is fuzzy cause some DB trim trailing data by default
+        assertTrue(objects.size() == 1 || objects.size() == 2);
+        assertTrue(objects.contains(a1));
+
+        query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE TRIM(TRAILING FROM a.artistName) = 'A'");
+        objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(a2));
+
+        query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE TRIM(BOTH FROM a.artistName) = 'A'");
+        objects = context.performQuery(query);
+        assertEquals(2, objects.size());
+        assertTrue(objects.contains(a1));
+        assertTrue(objects.contains(a2));
+
+    }
+
+    @Test
+    public void testTRIMChar() {
+
+        if (!accessStackAdapter.supportsTrimChar()) {
+            return;
+        }
+
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("XXXA");
+
+        Artist a2 = context.newObject(Artist.class);
+        a2.setArtistName("AXXX");
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE TRIM('X' FROM a.artistName) = 'A'");
+        List<?> objects = context.performQuery(query);
+        assertEquals(2, objects.size());
+        assertTrue(objects.contains(a1));
+        assertTrue(objects.contains(a2));
+
+        query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE TRIM(LEADING 'X' FROM a.artistName) = 'A'");
+        objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(a1));
+
+        query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE TRIM(TRAILING 'X' FROM a.artistName) = 'A'");
+        objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(a2));
+
+        query = new EJBQLQuery(
+                "SELECT a FROM Artist a WHERE TRIM(BOTH 'X' FROM a.artistName) = 'A'");
+        objects = context.performQuery(query);
+        assertEquals(2, objects.size());
+        assertTrue(objects.contains(a1));
+        assertTrue(objects.contains(a2));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/535ecb88/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLNumericalFunctionalIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLNumericalFunctionalIT.java b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLNumericalFunctionalIT.java
new file mode 100644
index 0000000..b639559
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextEJBQLNumericalFunctionalIT.java
@@ -0,0 +1,133 @@
+package org.apache.cayenne.access;
+
+import org.apache.cayenne.Cayenne;
+import org.apache.cayenne.ObjectContext;
+import org.apache.cayenne.QueryResponse;
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.query.EJBQLQuery;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.testdo.numeric_types.BigDecimalEntity;
+import org.apache.cayenne.testdo.numeric_types.BigIntegerEntity;
+import org.apache.cayenne.testdo.numeric_types.BooleanTestEntity;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+@UseServerRuntime(ServerCase.NUMERIC_TYPES_PROJECT)
+public class DataContextEJBQLNumericalFunctionalIT extends ServerCase {
+
+    @Inject
+    protected DBHelper dbHelper;
+
+    @Inject
+    private ObjectContext context;
+
+    private TableHelper tBigIntegerEntity;
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("BIGDECIMAL_ENTITY");
+        dbHelper.deleteAll("BIGINTEGER_ENTITY");
+        dbHelper.deleteAll("BOOLEAN_TEST");
+
+        tBigIntegerEntity = new TableHelper(dbHelper, "BIGINTEGER_ENTITY");
+        tBigIntegerEntity.setColumns("ID", "BIG_INTEGER_FIELD");
+    }
+
+    @Test
+    public void testABS() {
+
+        BigDecimalEntity o1 = context.newObject(BigDecimalEntity.class);
+        o1.setBigDecimalField(new BigDecimal("4.1"));
+
+        BigDecimalEntity o2 = context.newObject(BigDecimalEntity.class);
+        o2.setBigDecimalField(new BigDecimal("-5.1"));
+
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT d FROM BigDecimalEntity d WHERE ABS(d.bigDecimalField) > 4.5");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(o2));
+    }
+
+    @Test
+    public void testSQRT() {
+
+        BigDecimalEntity o1 = context.newObject(BigDecimalEntity.class);
+        o1.setBigDecimalField(new BigDecimal("9"));
+
+        BigDecimalEntity o2 = context.newObject(BigDecimalEntity.class);
+        o2.setBigDecimalField(new BigDecimal("16"));
+
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT d FROM BigDecimalEntity d WHERE SQRT(d.bigDecimalField) > 3.1");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(o2));
+    }
+
+    @Test
+    public void testMOD() {
+
+        BigIntegerEntity o1 = context.newObject(BigIntegerEntity.class);
+        o1.setBigIntegerField(new BigInteger("9"));
+
+        BigIntegerEntity o2 = context.newObject(BigIntegerEntity.class);
+        o2.setBigIntegerField(new BigInteger("10"));
+
+        context.commitChanges();
+
+        EJBQLQuery query = new EJBQLQuery(
+                "SELECT d FROM BigIntegerEntity d WHERE MOD(d.bigIntegerField, 4) = 2");
+        List<?> objects = context.performQuery(query);
+        assertEquals(1, objects.size());
+        assertTrue(objects.contains(o2));
+    }
+
+    @Test
+    public void testUpdateNoQualifierBoolean() throws Exception {
+
+        BooleanTestEntity o1 = context.newObject(BooleanTestEntity.class);
+        o1.setBooleanColumn(Boolean.TRUE);
+
+        BooleanTestEntity o2 = context.newObject(BooleanTestEntity.class);
+        o2.setBooleanColumn(Boolean.FALSE);
+
+        BooleanTestEntity o3 = context.newObject(BooleanTestEntity.class);
+        o3.setBooleanColumn(Boolean.FALSE);
+
+        context.commitChanges();
+
+        EJBQLQuery check = new EJBQLQuery("select count(p) from BooleanTestEntity p "
+                + "WHERE p.booleanColumn = true");
+
+        Object notUpdated = Cayenne.objectForQuery(context, check);
+        assertEquals(new Long(1l), notUpdated);
+
+        String ejbql = "UPDATE BooleanTestEntity AS p SET p.booleanColumn = true";
+        EJBQLQuery query = new EJBQLQuery(ejbql);
+
+        QueryResponse result = context.performGenericQuery(query);
+
+        int[] count = result.firstUpdateCount();
+        assertNotNull(count);
+        assertEquals(1, count.length);
+        assertEquals(3, count[0]);
+
+        notUpdated = Cayenne.objectForQuery(context, check);
+        assertEquals(new Long(3l), notUpdated);
+    }
+}


Mime
View raw message