cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [06/50] [abbrv] cayenne git commit: Apply JUnit4 instead of JUnit3 in IT
Date Fri, 14 Nov 2014 17:47:07 GMT
http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/query/SelectByIdIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectByIdIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectByIdIT.java
index e81a513..efeaed1 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectByIdIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectByIdIT.java
@@ -18,9 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.query;
 
-import static java.util.Collections.singletonMap;
-import static org.junit.Assert.assertNotEquals;
-
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.ObjectId;
@@ -33,6 +30,9 @@ import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import static java.util.Collections.singletonMap;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class SelectByIdIT extends ServerCase {
@@ -68,6 +68,7 @@ public class SelectByIdIT extends ServerCase {
 		tArtist.insert(3, "artist3");
 	}
 
+    @Test
 	public void testIntPk() throws Exception {
 		createTwoArtists();
 
@@ -80,6 +81,7 @@ public class SelectByIdIT extends ServerCase {
 		assertEquals("artist2", a2.getArtistName());
 	}
 
+    @Test
 	public void testMapPk() throws Exception {
 		createTwoArtists();
 
@@ -92,6 +94,7 @@ public class SelectByIdIT extends ServerCase {
 		assertEquals("artist2", a2.getArtistName());
 	}
 
+    @Test
 	public void testObjectIdPk() throws Exception {
 		createTwoArtists();
 
@@ -106,6 +109,7 @@ public class SelectByIdIT extends ServerCase {
 		assertEquals("artist2", a2.getArtistName());
 	}
 
+    @Test
 	public void testDataRowIntPk() throws Exception {
 		createTwoArtists();
 
@@ -118,6 +122,7 @@ public class SelectByIdIT extends ServerCase {
 		assertEquals("artist2", a2.get("ARTIST_NAME"));
 	}
 
+    @Test
 	public void testMetadataCacheKey() throws Exception {
 		SelectById<Painting> q1 = SelectById.query(Painting.class, 4);
 		QueryMetadata md1 = q1.getMetaData(context.getEntityResolver());
@@ -156,6 +161,7 @@ public class SelectByIdIT extends ServerCase {
 		assertEquals(md1.getCacheKey(), md5.getCacheKey());
 	}
 
+    @Test
 	public void testLocalCache() throws Exception {
 		createTwoArtists();
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
index 8cbf07b..664b67e 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryCacheKeyIT.java
@@ -25,6 +25,7 @@ import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class SelectQueryCacheKeyIT extends ServerCase {
@@ -32,6 +33,7 @@ public class SelectQueryCacheKeyIT extends ServerCase {
     @Inject
     private EntityResolver resolver;
 
+    @Test
     public void testNoCache() {
 
         SelectQuery query = new SelectQuery(Artist.class);
@@ -46,6 +48,7 @@ public class SelectQueryCacheKeyIT extends ServerCase {
         assertNull(md2.getCacheKey());
     }
 
+    @Test
     public void testLocalCache() {
 
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -57,6 +60,7 @@ public class SelectQueryCacheKeyIT extends ServerCase {
         assertNotNull(md1.getCacheKey());
     }
 
+    @Test
     public void testUseLocalCache() {
 
         SelectQuery<Artist> q1 = new SelectQuery<Artist>(Artist.class);
@@ -76,6 +80,7 @@ public class SelectQueryCacheKeyIT extends ServerCase {
         assertEquals(2, md2.getCacheGroups().length);
     }
 
+    @Test
     public void testSharedCache() {
 
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -86,7 +91,8 @@ public class SelectQueryCacheKeyIT extends ServerCase {
         assertEquals(QueryCacheStrategy.SHARED_CACHE, md1.getCacheStrategy());
         assertNotNull(md1.getCacheKey());
     }
-    
+
+    @Test
     public void testUseSharedCache() {
 
         SelectQuery<Artist> q1 = new SelectQuery<Artist>(Artist.class);
@@ -106,6 +112,7 @@ public class SelectQueryCacheKeyIT extends ServerCase {
         assertEquals(2, md2.getCacheGroups().length);
     }
 
+    @Test
     public void testNamedQuery() {
 
         SelectQuery query = new SelectQuery(Artist.class);
@@ -118,6 +125,7 @@ public class SelectQueryCacheKeyIT extends ServerCase {
         assertFalse("XYZ".equals(md1.getCacheKey()));
     }
 
+    @Test
     public void testUniqueKeyEntity() {
 
         SelectQuery q1 = new SelectQuery(Artist.class);
@@ -135,6 +143,7 @@ public class SelectQueryCacheKeyIT extends ServerCase {
         assertFalse(q1.getMetaData(resolver).getCacheKey().equals(q3.getMetaData(resolver).getCacheKey()));
     }
 
+    @Test
     public void testUniqueKeyEntityQualifier() {
 
         SelectQuery q1 = new SelectQuery(Artist.class);
@@ -155,6 +164,7 @@ public class SelectQueryCacheKeyIT extends ServerCase {
         assertFalse(q1.getMetaData(resolver).getCacheKey().equals(q3.getMetaData(resolver).getCacheKey()));
     }
 
+    @Test
     public void testUniqueKeyEntityFetchLimit() {
 
         SelectQuery q1 = new SelectQuery(Artist.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryFetchLimitOrderingIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryFetchLimitOrderingIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryFetchLimitOrderingIT.java
index a251137..cb25202 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryFetchLimitOrderingIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryFetchLimitOrderingIT.java
@@ -26,6 +26,7 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 import java.util.List;
 
@@ -61,6 +62,7 @@ public class SelectQueryFetchLimitOrderingIT extends ServerCase {
         tArtist.insert(33006, "e");
     }
 
+    @Test
     public void testOrdering() throws Exception {
 
         creatArtistsDataSet();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryIT.java
index 6f5527f..c78f522 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryIT.java
@@ -49,6 +49,7 @@ import org.apache.cayenne.testdo.testmap.ReturnTypesMap1;
 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.Arrays;
 import java.util.Collections;
@@ -120,7 +121,8 @@ public class SelectQueryIT extends ServerCase {
         tNumerics.insert(4, 3);
         tNumerics.insert(5, 4);
     }
-    
+
+    @Test
     public void testSetQualifier() {
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
         assertNull(query.getQualifier());
@@ -131,6 +133,7 @@ public class SelectQueryIT extends ServerCase {
         assertSame(qual, query.getQualifier());
     }
 
+    @Test
     public void testAndQualifier() {
     	SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
         assertNull(query.getQualifier());
@@ -144,6 +147,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(Expression.AND, query.getQualifier().getType());
     }
 
+    @Test
     public void testOrQualifier() {
     	SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
         assertNull(query.getQualifier());
@@ -157,6 +161,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(Expression.OR, query.getQualifier().getType());
     }
 
+    @Test
     public void testFetchLimit() throws Exception {
         createArtistsDataSet();
 
@@ -168,6 +173,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(7, objects.size());
     }
 
+    @Test
     public void testFetchOffset() throws Exception {
 
         createArtistsDataSet();
@@ -183,6 +189,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals("artist6", results.get(0).getArtistName());
     }
 
+    @Test
     public void testDbEntityRoot() throws Exception {
 
         createArtistsDataSet();
@@ -195,6 +202,7 @@ public class SelectQueryIT extends ServerCase {
         assertTrue(results.get(0) instanceof DataRow);
     }
 
+    @Test
     public void testFetchLimitWithOffset() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -207,6 +215,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals("artist16", results.get(0).getArtistName());
     }
 
+    @Test
     public void testFetchOffsetWithQualifier() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -223,6 +232,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(size, sizeAll - 5);
     }
 
+    @Test
     public void testFetchLimitWithQualifier() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -232,6 +242,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(7, objects.size());
     }
 
+    @Test
     public void testSelectAllObjectsRootEntityName() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>("Artist");
@@ -239,6 +250,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(20, objects.size());
     }
 
+    @Test
     public void testSelectAllObjectsRootClass() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -246,6 +258,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(20, objects.size());
     }
 
+    @Test
     public void testSelectAllObjectsRootObjEntity() throws Exception {
         createArtistsDataSet();
         ObjEntity artistEntity = context.getEntityResolver().getObjEntity(Artist.class);
@@ -255,6 +268,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(20, objects.size());
     }
 
+    @Test
     public void testSelectLikeExactMatch() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -264,6 +278,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(1, objects.size());
     }
 
+    @Test
     public void testSelectNotLikeSingleWildcardMatch() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -273,6 +288,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(19, objects.size());
     }
 
+    @Test
     public void testSelectNotLikeIgnoreCaseSingleWildcardMatch() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -282,6 +298,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(19, objects.size());
     }
 
+    @Test
     public void testSelectLikeCaseSensitive() throws Exception {
         if (!accessStackAdapter.supportsCaseSensitiveLike()) {
             return;
@@ -295,6 +312,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(0, objects.size());
     }
 
+    @Test
     public void testSelectLikeSingleWildcardMatch() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -304,6 +322,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(1, objects.size());
     }
 
+    @Test
     public void testSelectLikeSingleWildcardMatchAndEscape() throws Exception {
 
         createArtistsWildcardDataSet();
@@ -315,6 +334,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(1, objects.size());
     }
 
+    @Test
     public void testSelectLikeMultipleWildcardMatch() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -327,6 +347,7 @@ public class SelectQueryIT extends ServerCase {
     /**
      * Test how "like ignore case" works when using uppercase parameter.
      */
+    @Test
     public void testSelectLikeIgnoreCaseObjects1() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -337,6 +358,7 @@ public class SelectQueryIT extends ServerCase {
     }
 
     /** Test how "like ignore case" works when using lowercase parameter. */
+    @Test
     public void testSelectLikeIgnoreCaseObjects2() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class);
@@ -347,6 +369,7 @@ public class SelectQueryIT extends ServerCase {
     }
 
     /** Test how "like ignore case" works when using uppercase parameter. */
+    @Test
     public void testSelectLikeIgnoreCaseClob() throws Exception {
         if (accessStackAdapter.supportsLobs()) {
             createClobDataSet();
@@ -358,6 +381,7 @@ public class SelectQueryIT extends ServerCase {
         }
     }
 
+    @Test
     public void testSelectFetchLimit_Offset_DistinctClob() throws Exception {
         if (accessStackAdapter.supportsLobs()) {
             createClobDataSet();
@@ -376,6 +400,7 @@ public class SelectQueryIT extends ServerCase {
         }
     }
 
+    @Test
     public void testSelectEqualsClob() throws Exception {
         if (accessStackAdapter.supportsLobComparisons()) {
             createClobDataSet();
@@ -387,6 +412,7 @@ public class SelectQueryIT extends ServerCase {
         }
     }
 
+    @Test
     public void testSelectNotEqualsClob() throws Exception {
         if (accessStackAdapter.supportsLobComparisons()) {
             createClobDataSet();
@@ -398,6 +424,7 @@ public class SelectQueryIT extends ServerCase {
         }
     }
 
+    @Test
     public void testSelectIn() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -407,6 +434,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(2, objects.size());
     }
 
+    @Test
     public void testSelectParameterizedIn() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -417,6 +445,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(2, objects.size());
     }
 
+    @Test
     public void testSelectParameterizedEmptyIn() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -427,6 +456,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(0, objects.size());
     }
 
+    @Test
     public void testSelectParameterizedEmptyNotIn() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -437,6 +467,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(20, objects.size());
     }
 
+    @Test
     public void testSelectEmptyIn() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -446,6 +477,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(0, objects.size());
     }
 
+    @Test
     public void testSelectEmptyNotIn() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -455,6 +487,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(20, objects.size());
     }
 
+    @Test
     public void testSelectBooleanTrue() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -465,6 +498,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(1, objects.size());
     }
 
+    @Test
     public void testSelectBitwiseNot() throws Exception {
 
         if (!accessStackAdapter.supportsBitwiseOps()) {
@@ -487,6 +521,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(2, objects.size());
     }
 
+    @Test
     public void testSelectBitwiseOr() throws Exception {
 
         if (!accessStackAdapter.supportsBitwiseOps()) {
@@ -510,6 +545,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(2, objects.size());
     }
 
+    @Test
     public void testSelectBitwiseAnd() throws Exception {
 
         if (!accessStackAdapter.supportsBitwiseOps()) {
@@ -533,6 +569,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(3, objects.size());
     }
 
+    @Test
     public void testSelectBitwiseXor() throws Exception {
 
         if (!accessStackAdapter.supportsBitwiseOps()) {
@@ -557,6 +594,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(4, objects.get(0).getIntegerColumn().intValue());
     }
 
+    @Test
     public void testSelectBooleanNotTrueOr() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -568,6 +606,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(1, objects.size());
     }
 
+    @Test
     public void testSelectBooleanFalse() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -578,6 +617,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(0, objects.size());
     }
 
+    @Test
     public void testSelectBooleanFalseOr() throws Exception {
         createArtistsDataSet();
         SelectQuery query = new SelectQuery(Artist.class);
@@ -592,6 +632,7 @@ public class SelectQueryIT extends ServerCase {
      * Tests that all queries specified in prefetch are executed in a more
      * complex prefetch scenario.
      */
+    @Test
     public void testRouteWithPrefetches() {
         EntityResolver resolver = context.getEntityResolver();
         MockQueryRouter router = new MockQueryRouter();
@@ -626,6 +667,7 @@ public class SelectQueryIT extends ServerCase {
      * Tests that all queries specified in prefetch are executed in a more
      * complex prefetch scenario with no reverse obj relationships.
      */
+    @Test
     public void testRouteQueryWithPrefetchesNoReverse() {
 
         EntityResolver resolver = context.getEntityResolver();
@@ -667,6 +709,7 @@ public class SelectQueryIT extends ServerCase {
      * Test prefetching with qualifier on the root query being the path to the
      * prefetch.
      */
+    @Test
     public void testRouteQueryWithPrefetchesPrefetchExpressionPath() {
 
         // find the painting not matching the artist (this is the case where
@@ -686,6 +729,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(2, router.getQueryCount());
     }
 
+    @Test
     public void testLeftJoinAndPrefetchToMany() throws Exception {
         createArtistsDataSet();
         SelectQuery<Artist> query = new SelectQuery<Artist>(Artist.class, ExpressionFactory.matchExp(
@@ -694,6 +738,7 @@ public class SelectQueryIT extends ServerCase {
         context.performQuery(query);
     }
 
+    @Test
     public void testLeftJoinAndPrefetchToOne() throws Exception {
         createArtistsDataSet();
         SelectQuery<Painting> query = new SelectQuery<Painting>(Painting.class, ExpressionFactory.matchExp(
@@ -702,6 +747,7 @@ public class SelectQueryIT extends ServerCase {
         context.select(query);
     }
 
+    @Test
     public void testSelect_MatchObject() {
 
         Artist a1 = context.newObject(Artist.class);
@@ -732,6 +778,7 @@ public class SelectQueryIT extends ServerCase {
         assertEquals(query.getQualifier(), ExpressionFactory.matchAnyExp(Arrays.asList(a1, a3)));
     }
 
+    @Test
     public void testSelect_WithOrdering() {
 
         Artist a1 = context.newObject(Artist.class);
@@ -755,6 +802,7 @@ public class SelectQueryIT extends ServerCase {
     /**
      * Tests INs with more than 1000 elements
      */
+    @Test
     public void testSelectLongIn() {
         // not all adapters strip INs, so we just make sure query with such
         // qualifier
@@ -769,6 +817,7 @@ public class SelectQueryIT extends ServerCase {
         context.performQuery(query);
     }
 
+    @Test
     public void testCacheOffsetAndLimit() throws Exception {
         createArtistsDataSet();
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionIT.java
index df2b2f1..0189800 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionIT.java
@@ -29,6 +29,7 @@ import org.apache.cayenne.testdo.testmap.Gallery;
 import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class SelectQueryPrefetchRouterActionIT extends ServerCase {
@@ -36,6 +37,7 @@ public class SelectQueryPrefetchRouterActionIT extends ServerCase {
     @Inject
     private EntityResolver resolver;
 
+    @Test
     public void testPaintings1() {
         ObjEntity paintingEntity = resolver.getObjEntity(Painting.class);
         SelectQuery q = new SelectQuery(Artist.class, ExpressionFactory.matchExp("artistName", "abc"));
@@ -53,6 +55,7 @@ public class SelectQueryPrefetchRouterActionIT extends ServerCase {
         assertEquals(Expression.fromString("db:toArtist.ARTIST_NAME = 'abc'"), prefetch.getQualifier());
     }
 
+    @Test
     public void testPrefetchPaintings2() {
         ObjEntity paintingEntity = resolver.getObjEntity(Painting.class);
 
@@ -71,6 +74,7 @@ public class SelectQueryPrefetchRouterActionIT extends ServerCase {
                 prefetch.getQualifier());
     }
 
+    @Test
     public void testGalleries() {
         ObjEntity galleryEntity = resolver.getObjEntity(Gallery.class);
         SelectQuery q = new SelectQuery(Artist.class, ExpressionFactory.matchExp("artistName", "abc"));

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionQualifiedEntityIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionQualifiedEntityIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionQualifiedEntityIT.java
index 60361ca..ce42359 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionQualifiedEntityIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectQueryPrefetchRouterActionQualifiedEntityIT.java
@@ -29,6 +29,7 @@ import org.apache.cayenne.testdo.inherit.Employee;
 import org.apache.cayenne.testdo.inherit.Manager;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.PEOPLE_PROJECT)
 public class SelectQueryPrefetchRouterActionQualifiedEntityIT extends ServerCase {
@@ -36,6 +37,7 @@ public class SelectQueryPrefetchRouterActionQualifiedEntityIT extends ServerCase
     @Inject
     private EntityResolver resolver;
 
+    @Test
     public void testPrefetchEmployee() throws Exception {
         ObjEntity departmentEntity = resolver.getObjEntity(Department.class);
         SelectQuery q = new SelectQuery(Employee.class, ExpressionFactory.matchExp("name", "abc"));
@@ -55,6 +57,7 @@ public class SelectQueryPrefetchRouterActionQualifiedEntityIT extends ServerCase
                 + "or db:employees.PERSON_TYPE = 'EM')"), prefetch.getQualifier());
     }
 
+    @Test
     public void testPrefetchManager() throws Exception {
         ObjEntity departmentEntity = resolver.getObjEntity(Department.class);
         SelectQuery q = new SelectQuery(Manager.class, ExpressionFactory.matchExp("name", "abc"));

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/query/StatementFetchSizeIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/StatementFetchSizeIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/StatementFetchSizeIT.java
index 0a45df8..22bd81f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/StatementFetchSizeIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/StatementFetchSizeIT.java
@@ -24,6 +24,7 @@ import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class StatementFetchSizeIT extends ServerCase {
@@ -31,6 +32,7 @@ public class StatementFetchSizeIT extends ServerCase {
     @Inject
     private ObjectContext context;
 
+    @Test
     public void test() {
         SelectQuery query = new SelectQuery(Artist.class);
         query.setStatementFetchSize(10);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistryIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistryIT.java b/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistryIT.java
index 0f61530..ffbe753 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistryIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistryIT.java
@@ -30,6 +30,7 @@ import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.testdo.testmap.annotations.Tag1;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class LifecycleCallbackRegistryIT extends ServerCase {
@@ -37,6 +38,7 @@ public class LifecycleCallbackRegistryIT extends ServerCase {
     @Inject
     private ObjectContext context;
 
+    @Test
     public void testAddListener_PostAdd() {
         LifecycleCallbackRegistry registry = new LifecycleCallbackRegistry(context
                 .getEntityResolver());
@@ -61,6 +63,7 @@ public class LifecycleCallbackRegistryIT extends ServerCase {
         assertEquals("e:Painting;", listener.getAndReset());
     }
 
+    @Test
     public void testAddListener_PostAdd_InheritedListenerMethods() {
         LifecycleCallbackRegistry registry = new LifecycleCallbackRegistry(context
                 .getEntityResolver());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry_InheritanceIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry_InheritanceIT.java b/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry_InheritanceIT.java
index f246bcd..53531c4 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry_InheritanceIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/reflect/LifecycleCallbackRegistry_InheritanceIT.java
@@ -30,6 +30,7 @@ import org.apache.cayenne.testdo.inheritance_flat.UserProperties;
 import org.apache.cayenne.testdo.testmap.annotations.Tag2;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.INHERTITANCE_SINGLE_TABLE1_PROJECT)
 public class LifecycleCallbackRegistry_InheritanceIT extends ServerCase {
@@ -37,6 +38,7 @@ public class LifecycleCallbackRegistry_InheritanceIT extends ServerCase {
     @Inject
     private ObjectContext context;
 
+    @Test
     public void testAddListener_PostAdd_EntityInheritance() {
         LifecycleCallbackRegistry registry = new LifecycleCallbackRegistry(context
                 .getEntityResolver());

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyIT.java b/cayenne-server/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyIT.java
index e9d8497..e320095 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/reflect/MixedPersistenceStrategyIT.java
@@ -29,6 +29,7 @@ import org.apache.cayenne.testdo.testmap.MixedPersistenceStrategy;
 import org.apache.cayenne.testdo.testmap.MixedPersistenceStrategy2;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 /**
  * Tests conflicts between field and map-based persistence.
@@ -67,6 +68,7 @@ public class MixedPersistenceStrategyIT extends ServerCase {
         tMixedPersistenceStrategy2.insert(2, 1, "dn2");
     }
 
+    @Test
     public void testConflictingField1() throws Exception {
 
         createConflictingFieldDataSet();
@@ -83,6 +85,7 @@ public class MixedPersistenceStrategyIT extends ServerCase {
     /**
      * This test case reproduces CAY-582 bug.
      */
+    @Test
     public void testConflictingField2() throws Exception {
 
         createConflictingFieldDataSet();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactoryIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactoryIT.java b/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactoryIT.java
index d420ba5..a1cf9f2 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactoryIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactoryIT.java
@@ -31,6 +31,7 @@ import org.apache.cayenne.reflect.ToManyProperty;
 import org.apache.cayenne.reflect.ToOneProperty;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class DataObjectDescriptorFactoryIT extends ServerCase {
@@ -38,6 +39,7 @@ public class DataObjectDescriptorFactoryIT extends ServerCase {
     @Inject
     private EntityResolver resolver;
 
+    @Test
     public void testVisitDeclaredProperties_IterationOrder() {
 
         DataObjectDescriptorFactory factory = new DataObjectDescriptorFactory(
@@ -74,6 +76,7 @@ public class DataObjectDescriptorFactoryIT extends ServerCase {
 
     }
 
+    @Test
     public void testVisitProperties_IterationOrder() {
 
         DataObjectDescriptorFactory factory = new DataObjectDescriptorFactory(

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactory_InheritanceMapsIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactory_InheritanceMapsIT.java b/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactory_InheritanceMapsIT.java
index aba4a61..22f2d06 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactory_InheritanceMapsIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/reflect/generic/DataObjectDescriptorFactory_InheritanceMapsIT.java
@@ -30,6 +30,7 @@ import org.apache.cayenne.reflect.ToManyProperty;
 import org.apache.cayenne.reflect.ToOneProperty;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.INHERTITANCE_SINGLE_TABLE1_PROJECT)
 public class DataObjectDescriptorFactory_InheritanceMapsIT extends ServerCase {
@@ -37,6 +38,7 @@ public class DataObjectDescriptorFactory_InheritanceMapsIT extends ServerCase {
     @Inject
     private EntityResolver resolver;
 
+    @Test
     public void testVisitProperties_IterationOrder() {
 
         DataObjectDescriptorFactory factory = new DataObjectDescriptorFactory(

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/tx/DefaultTransactionManagerIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/tx/DefaultTransactionManagerIT.java b/cayenne-server/src/test/java/org/apache/cayenne/tx/DefaultTransactionManagerIT.java
index 126a498..57f0739 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/tx/DefaultTransactionManagerIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/tx/DefaultTransactionManagerIT.java
@@ -21,6 +21,7 @@ package org.apache.cayenne.tx;
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -28,6 +29,7 @@ import static org.mockito.Mockito.when;
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class DefaultTransactionManagerIT extends ServerCase {
 
+    @Test
     public void testPerformInTransaction_NoTx() {
 
         final BaseTransaction tx = mock(BaseTransaction.class);
@@ -47,6 +49,7 @@ public class DefaultTransactionManagerIT extends ServerCase {
         assertSame(expectedResult, result);
     }
 
+    @Test
     public void testPerformInTransaction_ExistingTx() {
 
         final BaseTransaction tx1 = mock(BaseTransaction.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICase.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICase.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICase.java
index 0a472cb..f01f957 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICase.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICase.java
@@ -18,22 +18,22 @@
  ****************************************************************/
 package org.apache.cayenne.unit.di;
 
-import junit.framework.TestCase;
-
 import org.apache.cayenne.di.Injector;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
 
 /**
  * A unit test superclass that supports injection of members based on the standard unit
  * test container.
  */
-public abstract class DICase extends TestCase {
+public abstract class DICase extends Assert {
 
     protected abstract Injector getUnitTestInjector();
 
-    @Override
-    protected final void setUp() throws Exception {
+    @Before
+    public final void setUp() throws Exception {
         getUnitTestInjector().getInstance(UnitTestLifecycleManager.class).setUp(this);
-
         try {
             setUpAfterInjection();
         }
@@ -56,8 +56,8 @@ public abstract class DICase extends TestCase {
         }
     }
 
-    @Override
-    protected final void tearDown() throws Exception {
+    @After
+    public final void tearDown() throws Exception {
 
         try {
             tearDownBeforeInjection();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICaseSelfIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICaseSelfIT.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICaseSelfIT.java
index 605ba17..d6fe535 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICaseSelfIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DICaseSelfIT.java
@@ -25,6 +25,7 @@ import org.apache.cayenne.di.Injector;
 import org.apache.cayenne.di.Key;
 import org.apache.cayenne.di.Module;
 import org.apache.cayenne.di.spi.DefaultScope;
+import org.junit.Test;
 
 public class DICaseSelfIT extends DICase {
 
@@ -62,6 +63,7 @@ public class DICaseSelfIT extends DICase {
         return injector;
     }
 
+    @Test
     public void testInjection() throws Exception {
 
         Object testScoped = this.testScoped;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DefaultUnitTestLifecycleManager.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DefaultUnitTestLifecycleManager.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DefaultUnitTestLifecycleManager.java
index 1c73a06..0cca948 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DefaultUnitTestLifecycleManager.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/DefaultUnitTestLifecycleManager.java
@@ -18,8 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.unit.di;
 
-import junit.framework.TestCase;
-
 import org.apache.cayenne.di.BeforeScopeEnd;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.di.Injector;
@@ -36,12 +34,12 @@ public class DefaultUnitTestLifecycleManager implements UnitTestLifecycleManager
         this.scope = scope;
     }
 
-    public <T extends TestCase> void setUp(T testCase) {
+    public <T> void setUp(T testCase) {
         injector.injectMembers(testCase);
     }
 
     @BeforeScopeEnd
-    public <T extends TestCase> void tearDown(T testCase) {
+    public <T> void tearDown(T testCase) {
         scope.shutdown();
     }
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/di/UnitTestLifecycleManager.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/UnitTestLifecycleManager.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/UnitTestLifecycleManager.java
index a2f7434..eec5a5f 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/UnitTestLifecycleManager.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/UnitTestLifecycleManager.java
@@ -18,11 +18,9 @@
  ****************************************************************/
 package org.apache.cayenne.unit.di;
 
-import junit.framework.TestCase;
-
 public interface UnitTestLifecycleManager {
 
-    <T extends TestCase> void setUp(T testCase);
+    <T> void setUp(T testCase);
 
-    <T extends TestCase> void tearDown(T testCase);
+    <T> void tearDown(T testCase);
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseLifecycleManager.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseLifecycleManager.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseLifecycleManager.java
index 7677248..9a8764d 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseLifecycleManager.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseLifecycleManager.java
@@ -18,8 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.unit.di.server;
 
-import junit.framework.TestCase;
-
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.di.Provider;
 import org.apache.cayenne.di.spi.DefaultScope;
@@ -35,7 +33,7 @@ public class ServerCaseLifecycleManager extends DefaultUnitTestLifecycleManager
     }
 
     @Override
-    public <T extends TestCase> void setUp(T testCase) {
+    public <T> void setUp(T testCase) {
 
         // init current runtime
         UseServerRuntime runtimeName = testCase.getClass().getAnnotation(

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseSelfIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseSelfIT.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseSelfIT.java
index bd72025..2c60da2 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseSelfIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/di/server/ServerCaseSelfIT.java
@@ -21,6 +21,7 @@ package org.apache.cayenne.unit.di.server;
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.di.Provider;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class ServerCaseSelfIT extends ServerCase {
@@ -34,6 +35,7 @@ public class ServerCaseSelfIT extends ServerCase {
     @Inject
     protected ServerCaseProperties properties;
 
+    @Test
     public void testSetup_TearDown_Runtime() throws Exception {
 
         assertNotNull(properties);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java
index 024f5e9..2e47ceb 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_115IT.java
@@ -30,6 +30,7 @@ import org.apache.cayenne.testdo.relationship.ClobMaster;
 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;
 
@@ -78,6 +79,7 @@ public class CAY_115IT extends ServerCase {
         tClobDetail.insert(4, 3, "cd31");
     }
 
+    @Test
     public void testDistinctClobFetch() throws Exception {
         if (!accessStackAdapter.supportsLobInsertsAsStrings()) {
             return;
@@ -99,6 +101,7 @@ public class CAY_115IT extends ServerCase {
         assertEquals(noDistinctResult, distinctResult);
     }
 
+    @Test
     public void testDistinctClobFetchWithToManyJoin() throws Exception {
         if (!accessStackAdapter.supportsLobInsertsAsStrings()) {
             return;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_191IT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_191IT.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_191IT.java
index eaf446e..bc5acbe 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_191IT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_191IT.java
@@ -19,8 +19,6 @@
 
 package org.apache.cayenne.unit.jira;
 
-import java.sql.Types;
-
 import org.apache.cayenne.Cayenne;
 import org.apache.cayenne.access.DataContext;
 import org.apache.cayenne.di.Inject;
@@ -29,6 +27,9 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.relationship.FkOfDifferentType;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.sql.Types;
 
 @UseServerRuntime(ServerCase.RELATIONSHIPS_PROJECT)
 public class CAY_191IT extends ServerCase {
@@ -61,6 +62,7 @@ public class CAY_191IT extends ServerCase {
         tFkOfDifferentType.insert(1, 1);
     }
 
+    @Test
     public void testResolveToOneOverFKOfDifferentNumType() throws Exception {
         // this is mostly for legacy schemas, as on many dbs you won;t be able to even
         // create the FK constraint...

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_194IT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_194IT.java b/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_194IT.java
index 5ebfd81..51f1dd1 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_194IT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/unit/jira/CAY_194IT.java
@@ -29,6 +29,7 @@ import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.relationship.ReflexiveAndToOne;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 import java.sql.Types;
 import java.util.List;
@@ -58,6 +59,7 @@ public class CAY_194IT extends ServerCase {
         dbHelper.deleteAll("TO_ONEFK1");
     }
 
+    @Test
     public void testQualifyOnToMany() {
 
         ReflexiveAndToOne ox = context.newObject(ReflexiveAndToOne.class);
@@ -84,6 +86,7 @@ public class CAY_194IT extends ServerCase {
         assertEquals(0, parents.size());
     }
 
+    @Test
     public void testQualifyOnToOne() {
 
         ReflexiveAndToOne ox = context.newObject(ReflexiveAndToOne.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationIT.java b/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationIT.java
index f106204..c58ed54 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationIT.java
@@ -28,6 +28,7 @@ import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class DeepMergeOperationIT extends ServerCase {
@@ -41,6 +42,7 @@ public class DeepMergeOperationIT extends ServerCase {
     @Inject
     private DataContext context1;
 
+    @Test
     public void testDeepMergeNonExistent() {
 
         final Artist a = context.newObject(Artist.class);
@@ -60,6 +62,7 @@ public class DeepMergeOperationIT extends ServerCase {
         });
     }
 
+    @Test
     public void testDeepMergeModified() {
 
         final Artist a = context.newObject(Artist.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java b/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
index ba64dec..04813da 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/util/DeepMergeOperationInheritanceIT.java
@@ -30,6 +30,7 @@ import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.PEOPLE_PROJECT)
 public class DeepMergeOperationInheritanceIT extends ServerCase {
@@ -43,6 +44,7 @@ public class DeepMergeOperationInheritanceIT extends ServerCase {
     @Inject
     protected DataChannelInterceptor queryInterceptor;
 
+    @Test
     public void testDeepMergeExistingSubclass() {
 
         final Department d1 = context.newObject(Department.class);
@@ -93,6 +95,7 @@ public class DeepMergeOperationInheritanceIT extends ServerCase {
 
     }
 
+    @Test
     public void testDeepMergeNonExistentSubclass() {
 
         final Department d1 = context.newObject(Department.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/util/EntityMergeSupportIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/util/EntityMergeSupportIT.java b/cayenne-server/src/test/java/org/apache/cayenne/util/EntityMergeSupportIT.java
index d5239fd..c5e59f9 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/util/EntityMergeSupportIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/util/EntityMergeSupportIT.java
@@ -18,9 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.util;
 
-import java.sql.Types;
-import java.util.Arrays;
-
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbJoin;
@@ -30,10 +27,15 @@ import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.merge.MergeCase;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.sql.Types;
+import java.util.Arrays;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class EntityMergeSupportIT extends MergeCase {
 
+    @Test
     public void testMerging() {
         DbEntity dbEntity1 = new DbEntity("NEW_TABLE");
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/util/ShallowMergeOperationIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/util/ShallowMergeOperationIT.java b/cayenne-server/src/test/java/org/apache/cayenne/util/ShallowMergeOperationIT.java
index 6faa4a8..fe4623b 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/util/ShallowMergeOperationIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/util/ShallowMergeOperationIT.java
@@ -35,6 +35,7 @@ import org.apache.cayenne.unit.di.DataChannelInterceptor;
 import org.apache.cayenne.unit.di.UnitTestClosure;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class ShallowMergeOperationIT extends ServerCase {
@@ -73,6 +74,7 @@ public class ShallowMergeOperationIT extends ServerCase {
         tArtist.insert(33004, "artist4");
     }
 
+    @Test
     public void testMerge_Relationship() throws Exception {
 
         ObjectContext childContext = runtime.newContext(context);
@@ -96,6 +98,7 @@ public class ShallowMergeOperationIT extends ServerCase {
         });
     }
 
+    @Test
     public void testMerge_NoOverride() throws Exception {
         createArtistsDataSet();
 
@@ -136,6 +139,7 @@ public class ShallowMergeOperationIT extends ServerCase {
         });
     }
 
+    @Test
     public void testMerge_PersistenceStates() throws Exception {
         createArtistsDataSet();
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/velocity/BindDirectiveIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/velocity/BindDirectiveIT.java b/cayenne-server/src/test/java/org/apache/cayenne/velocity/BindDirectiveIT.java
index 60f23d6..d94fa17 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/velocity/BindDirectiveIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/velocity/BindDirectiveIT.java
@@ -18,17 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.velocity;
 
-import java.sql.Connection;
-import java.sql.Timestamp;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.access.DataNode;
@@ -46,6 +35,18 @@ import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.ServerCaseDataSourceFactory;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.sql.Timestamp;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * Tests BindDirective for passed null parameters and for not passed parameters
@@ -80,6 +81,7 @@ public class BindDirectiveIT extends ServerCase {
         dbHelper.deleteAll("ARTIST");
     }
 
+    @Test
     public void testBindTimestamp() throws Exception {
         Map<String, Object> parameters = new HashMap<String, Object>();
         parameters.put("id", new Integer(1));
@@ -97,6 +99,7 @@ public class BindDirectiveIT extends ServerCase {
         assertEquals(Date.class, row.get("DATE_OF_BIRTH").getClass());
     }
 
+    @Test
     public void testBindSQLDate() throws Exception {
         Map<String, Object> parameters = new HashMap<String, Object>();
         parameters.put("id", new Integer(1));
@@ -114,6 +117,7 @@ public class BindDirectiveIT extends ServerCase {
         assertEquals(Date.class, row.get("DATE_OF_BIRTH").getClass());
     }
 
+    @Test
     public void testBindUtilDate() throws Exception {
         Map<String, Object> parameters = new HashMap<String, Object>();
         parameters.put("id", new Integer(1));
@@ -131,6 +135,7 @@ public class BindDirectiveIT extends ServerCase {
         assertEquals(Date.class, row.get("DATE_OF_BIRTH").getClass());
     }
 
+    @Test
     public void testBindingForCollection() throws Exception {
 
         // insert 3 artists
@@ -157,6 +162,7 @@ public class BindDirectiveIT extends ServerCase {
         assertEquals(2, result.size());
     }
 
+    @Test
     public void testBindForPassedNullParam() throws Exception {
         Map<String, Object> parameters = new HashMap<String, Object>();
         parameters.put("id", new Long(1));
@@ -172,6 +178,7 @@ public class BindDirectiveIT extends ServerCase {
         assertNull(row.get("DATE_OF_BIRTH"));
     }
 
+    @Test
     public void testBindWithJDBCForPassedNullParam() throws Exception {
         Map<String, Object> parameters = new HashMap<String, Object>();
         parameters.put("id", new Long(1));
@@ -187,6 +194,7 @@ public class BindDirectiveIT extends ServerCase {
         assertNull(row.get("DATE_OF_BIRTH"));
     }
 
+    @Test
     public void testBindForNotPassedParam() throws Exception {
         Map<String, Object> parameters = new HashMap<String, Object>();
         parameters.put("id", new Long(1));
@@ -201,6 +209,7 @@ public class BindDirectiveIT extends ServerCase {
         assertNull(row.get("DATE_OF_BIRTH"));
     }
 
+    @Test
     public void testBindWithJDBCForNotPassedParam() throws Exception {
         Map<String, Object> parameters = new HashMap<String, Object>();
         parameters.put("id", new Long(1));

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/cayenne-server/src/test/java/org/apache/cayenne/velocity/ResultDirectiveIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/velocity/ResultDirectiveIT.java b/cayenne-server/src/test/java/org/apache/cayenne/velocity/ResultDirectiveIT.java
index 2e7049b..5c40bc9 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/velocity/ResultDirectiveIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/velocity/ResultDirectiveIT.java
@@ -18,12 +18,6 @@
  ****************************************************************/
 package org.apache.cayenne.velocity;
 
-import java.sql.Connection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import org.apache.cayenne.DataRow;
 import org.apache.cayenne.access.DataNode;
 import org.apache.cayenne.access.MockOperationObserver;
@@ -38,6 +32,13 @@ import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
+import org.junit.Test;
+
+import java.sql.Connection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Test for Result directive to check if we could use ResultDitrective
@@ -70,6 +71,7 @@ public class ResultDirectiveIT extends ServerCase {
 		dbHelper.deleteAll("GALLERY");
 	}
 
+    @Test
 	public void testWithoutResultDirective() throws Exception {
 		String sql = "SELECT ARTIST_ID, ARTIST_NAME FROM ARTIST";
 		Map<String, Object> artist = insertArtist();
@@ -79,6 +81,7 @@ public class ResultDirectiveIT extends ServerCase {
 		assertEquals(artist.get("ARTIST_NAME"), selectResult.get("ARTIST_NAME"));
 	}
 
+    @Test
 	public void testWithOnlyResultDirective() throws Exception {
 		String sql = "SELECT #result('ARTIST_ID' 'java.lang.Integer')," + " #result('ARTIST_NAME' 'java.lang.String')"
 				+ " FROM ARTIST";
@@ -89,6 +92,7 @@ public class ResultDirectiveIT extends ServerCase {
 		assertEquals(artist.get("ARTIST_NAME"), selectResult.get("ARTIST_NAME").toString().trim());
 	}
 
+    @Test
 	public void testWithMixedDirectiveUse1() throws Exception {
 		String sql = "SELECT ARTIST_ID," + " #result('ARTIST_NAME' 'java.lang.String')" + " FROM ARTIST";
 		Map<String, Object> artist = insertArtist();
@@ -98,6 +102,7 @@ public class ResultDirectiveIT extends ServerCase {
 		assertEquals(artist.get("ARTIST_NAME"), selectResult.get("ARTIST_NAME").toString().trim());
 	}
 
+    @Test
 	public void testWithMixedDirectiveUse2() throws Exception {
 		String sql = "SELECT #result('ARTIST_ID' 'java.lang.Integer')," + " ARTIST_NAME " + " FROM ARTIST";
 		Map<String, Object> artist = insertArtist();

http://git-wip-us.apache.org/repos/asf/cayenne/blob/b62c9d01/itests/cayenne-tools-itest/src/test/java/org/apache/cayenne/tools/CayenneGeneratorIntegrationTest.java
----------------------------------------------------------------------
diff --git a/itests/cayenne-tools-itest/src/test/java/org/apache/cayenne/tools/CayenneGeneratorIntegrationTest.java b/itests/cayenne-tools-itest/src/test/java/org/apache/cayenne/tools/CayenneGeneratorIntegrationTest.java
index 35ae3d8..c58d3d0 100644
--- a/itests/cayenne-tools-itest/src/test/java/org/apache/cayenne/tools/CayenneGeneratorIntegrationTest.java
+++ b/itests/cayenne-tools-itest/src/test/java/org/apache/cayenne/tools/CayenneGeneratorIntegrationTest.java
@@ -18,15 +18,19 @@
  ****************************************************************/
 package org.apache.cayenne.tools;
 
+import org.junit.Test;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStreamReader;
 import java.util.regex.Pattern;
 
-import junit.framework.TestCase;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
-public class CayenneGeneratorIntegrationTest extends TestCase {
+public class CayenneGeneratorIntegrationTest {
 
     private File testDir;
 
@@ -38,6 +42,7 @@ public class CayenneGeneratorIntegrationTest extends TestCase {
     /**
      * Test single classes with a non-standard template.
      */
+    @Test
     public void testSingleClassesCustTemplate() throws Exception {
         startTest("single-classes-cust-template");
 
@@ -47,6 +52,7 @@ public class CayenneGeneratorIntegrationTest extends TestCase {
     }
 
     /** Test single classes generation including full package path. */
+    @Test
     public void testSingleClasses1() throws Exception {
         startTest("single-classes1");
 
@@ -56,6 +62,7 @@ public class CayenneGeneratorIntegrationTest extends TestCase {
     }
 
     /** Test single classes generation ignoring package path. */
+    @Test
     public void testSingleClasses2() throws Exception {
         startTest("single-classes2");
 
@@ -65,6 +72,7 @@ public class CayenneGeneratorIntegrationTest extends TestCase {
     }
 
     /** Test pairs generation including full package path. */
+    @Test
     public void testPairs1() throws Exception {
         startTest("pairs1");
 
@@ -75,6 +83,7 @@ public class CayenneGeneratorIntegrationTest extends TestCase {
     }
 
     /** Test pairs generation in the same directory. */
+    @Test
     public void testPairs2() throws Exception {
         startTest("pairs2");
 
@@ -87,6 +96,7 @@ public class CayenneGeneratorIntegrationTest extends TestCase {
      * Test pairs generation including full package path with superclass and
      * subclass in different packages.
      */
+    @Test
     public void testPairs3() throws Exception {
         startTest("pairs3");
 
@@ -95,7 +105,8 @@ public class CayenneGeneratorIntegrationTest extends TestCase {
         assertContents("org/apache/cayenne/testdo/testmap/superart/_Artist.java", "_Artist",
                 "org.apache.cayenne.testdo.testmap.superart", "CayenneDataObject");
     }
-    
+
+    @Test
     public void testPairs1_client() throws Exception {
         startTest("pairs1-client");
 
@@ -105,6 +116,7 @@ public class CayenneGeneratorIntegrationTest extends TestCase {
                 "org.apache.cayenne.testdo.testmap.client.superart", "PersistentObject");
     }
 
+    @Test
     public void testPairsEmbeddable3() throws Exception {
         startTest("pairs-embeddables3");
 


Mime
View raw message