james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1051399 - in /james/mailbox/trunk: api/src/test/java/org/apache/james/mailbox/ jpa/ jpa/src/test/java/org/apache/james/mailbox/jpa/ store/src/test/java/org/apache/james/mailbox/store/
Date Tue, 21 Dec 2010 07:48:01 GMT
Author: eric
Date: Tue Dec 21 07:48:01 2010
New Revision: 1051399

URL: http://svn.apache.org/viewvc?rev=1051399&view=rev
Log:
MailboxManagerTest must reside in mailbox-api (and not mailbox-store) project.

Added:
    james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
      - copied, changed from r1051205, james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMailboxManagerTest.java
Removed:
    james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMailboxManagerTest.java
Modified:
    james/mailbox/trunk/jpa/pom.xml
    james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java

Copied: james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
(from r1051205, james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMailboxManagerTest.java)
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java?p2=james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java&p1=james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMailboxManagerTest.java&r1=1051205&r2=1051399&rev=1051399&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMailboxManagerTest.java
(original)
+++ james/mailbox/trunk/api/src/test/java/org/apache/james/mailbox/MailboxManagerTest.java
Tue Dec 21 07:48:01 2010
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-package org.apache.james.mailbox.store;
+package org.apache.james.mailbox;
 
 import java.io.ByteArrayInputStream;
 import java.io.UnsupportedEncodingException;
@@ -43,7 +43,7 @@ import org.junit.Test;
  * implement the test methods.
  * 
  */
-public abstract class StoreMailboxManagerTest {
+public abstract class MailboxManagerTest {
     
     /**
      * The mailboxManager that needs to get instanciated
@@ -112,18 +112,22 @@ public abstract class StoreMailboxManage
     }
     
     /**
-     * Setter to inject the MailboxManager.
+     * Setter to inject the mailboxManager.
      */
     protected static void setMailboxManager(MailboxManager mailboxManager) {
-        StoreMailboxManagerTest.mailboxManager = mailboxManager;
+        MailboxManagerTest.mailboxManager = mailboxManager;
     }
 
     /**
-     * Accessor to the MailboxManager.
+     * Accessor to the mailboxManager.
      * 
      * @return the mailboxManager instance.
+     * @throws IllegalStateException in case of null mailboxManager
      */
     protected static MailboxManager getMailboxManager() {
+        if (mailboxManager == null) {
+            throw new IllegalStateException("Please setMailboxManager with a non null value
before requesting getMailboxManager()");
+        }
         return mailboxManager;
     }
 

Modified: james/mailbox/trunk/jpa/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jpa/pom.xml?rev=1051399&r1=1051398&r2=1051399&view=diff
==============================================================================
--- james/mailbox/trunk/jpa/pom.xml (original)
+++ james/mailbox/trunk/jpa/pom.xml Tue Dec 21 07:48:01 2010
@@ -57,7 +57,7 @@
     </dependency>
     <dependency>
       <groupId>org.apache.james</groupId>
-      <artifactId>apache-james-mailbox-store</artifactId>
+      <artifactId>apache-james-mailbox-api</artifactId>
       <scope>test</scope>
       <type>test-jar</type>
     </dependency>

Modified: james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java?rev=1051399&r1=1051398&r2=1051399&view=diff
==============================================================================
--- james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java
(original)
+++ james/mailbox/trunk/jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java
Tue Dec 21 07:48:01 2010
@@ -22,6 +22,7 @@ import java.util.HashMap;
 
 import javax.persistence.EntityManagerFactory;
 
+import org.apache.james.mailbox.MailboxManagerTest;
 import org.apache.james.mailbox.jpa.mail.JPACachingUidProvider;
 import org.apache.james.mailbox.jpa.mail.model.JPAHeader;
 import org.apache.james.mailbox.jpa.mail.model.JPAMailbox;
@@ -32,14 +33,13 @@ import org.apache.james.mailbox.jpa.mail
 import org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage;
 import org.apache.james.mailbox.jpa.openjpa.OpenJPAMailboxManager;
 import org.apache.james.mailbox.jpa.user.model.JPASubscription;
-import org.apache.james.mailbox.store.StoreMailboxManagerTest;
 import org.apache.openjpa.persistence.OpenJPAPersistence;
 import org.junit.BeforeClass;
 
 /**
  * JPAMailboxManagerTest that extends the StoreMailboxManagerTest.
  */
-public class JPAMailboxManagerTest extends StoreMailboxManagerTest {
+public class JPAMailboxManagerTest extends MailboxManagerTest {
     
     /**
      * The entity manager factory.



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message