cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1099056 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverTest.java
Date Tue, 03 May 2011 13:55:07 GMT
Author: aadamchik
Date: Tue May  3 13:55:07 2011
New Revision: 1099056

URL: http://svn.apache.org/viewvc?rev=1099056&view=rev
Log:
CAY-1563 CayenneCase unit tests conversion(3)

patches by Dzmitry Kazimirchyk:
DefaultOperationObserverTest

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverTest.java?rev=1099056&r1=1099055&r2=1099056&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/util/DefaultOperationObserverTest.java
Tue May  3 13:55:07 2011
@@ -20,26 +20,21 @@
 package org.apache.cayenne.access.util;
 
 import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.unit.CayenneCase;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
-/**
- */
-public class DefaultOperationObserverTest extends CayenneCase {
-
-    protected DefaultOperationObserver observer;
-
-    @Override
-    public void setUp() throws Exception {
-        observer = new DefaultOperationObserver();
-    }
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class DefaultOperationObserverTest extends ServerCase {
 
     public void testHasExceptions1() throws Exception {
+        DefaultOperationObserver observer = new DefaultOperationObserver();
         assertFalse(observer.hasExceptions());
         observer.nextGlobalException(new Exception());
         assertTrue(observer.hasExceptions());
     }
 
     public void testHasExceptions2() throws Exception {
+        DefaultOperationObserver observer = new DefaultOperationObserver();
         assertFalse(observer.hasExceptions());
         observer.nextQueryException(new SelectQuery(), new Exception());
         assertTrue(observer.hasExceptions());



Mime
View raw message