You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by rc...@apache.org on 2020/07/17 10:24:10 UTC

[james-project] 01/09: [Refactoring] Migrate MailboxCopierTest to JUnit5

This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit f78a9145d7f53bc323818680b8d96523b1c30cca
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Fri Jul 17 10:40:02 2020 +0700

    [Refactoring] Migrate MailboxCopierTest to JUnit5
---
 .../mailbox/tools/copier/MailboxCopierTest.java     | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/mailbox/tools/copier/src/test/java/org/apache/james/mailbox/tools/copier/MailboxCopierTest.java b/mailbox/tools/copier/src/test/java/org/apache/james/mailbox/tools/copier/MailboxCopierTest.java
index 5efb540..57b0937 100644
--- a/mailbox/tools/copier/src/test/java/org/apache/james/mailbox/tools/copier/MailboxCopierTest.java
+++ b/mailbox/tools/copier/src/test/java/org/apache/james/mailbox/tools/copier/MailboxCopierTest.java
@@ -33,8 +33,8 @@ import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.inmemory.manager.InMemoryIntegrationResources;
 import org.apache.james.mailbox.mock.DataProvisioner;
 import org.apache.james.mailbox.model.MailboxPath;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Test class for the {@link MailboxCopierImpl} implementation.
@@ -43,33 +43,30 @@ import org.junit.Test;
  * Mailbox Manager.
  *
  */
-public class MailboxCopierTest {
+class MailboxCopierTest {
     /**
      * The instance for the test mailboxCopier.
      */
-    private MailboxCopierImpl mailboxCopier;
+    MailboxCopierImpl mailboxCopier;
 
     /**
      * The instance for the source Mailbox Manager.
      */
-    private MailboxManager srcMemMailboxManager;
+    MailboxManager srcMemMailboxManager;
 
     /**
      * The instance for the destination Mailbox Manager.
      */
-    private MailboxManager dstMemMailboxManager;
+    MailboxManager dstMemMailboxManager;
 
     /**
      * Setup the mailboxCopier and the source and destination
      * Mailbox Manager.
      *
      * We use a InMemoryMailboxManager implementation.
-     *
-     * @throws BadCredentialsException
-     * @throws MailboxException
      */
-    @Before
-    public void setup() throws BadCredentialsException, MailboxException {
+    @BeforeEach
+    void setup() {
         mailboxCopier = new MailboxCopierImpl();
 
         srcMemMailboxManager = newInMemoryMailboxManager();
@@ -89,7 +86,7 @@ public class MailboxCopierTest {
      * @throws IOException
      */
     @Test
-    public void testMailboxCopy() throws MailboxException, IOException {
+    void testMailboxCopy() throws MailboxException, IOException {
         DataProvisioner.feedMailboxManager(srcMemMailboxManager);
 
         assertMailboxManagerSize(srcMemMailboxManager, 1);


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