james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject [3/5] james-project git commit: MAILBOX-269 move test methods for better readability
Date Tue, 07 Jun 2016 06:51:59 GMT
MAILBOX-269 move test methods for better readability


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/45f43560
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/45f43560
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/45f43560

Branch: refs/heads/master
Commit: 45f435604c2e23af9622e11ca22b8c2b4ba0e399
Parents: 22bd669
Author: Matthieu Baechler <matthieu.baechler@linagora.com>
Authored: Tue May 31 18:43:30 2016 +0200
Committer: Matthieu Baechler <matthieu.baechler@linagora.com>
Committed: Tue Jun 7 08:50:58 2016 +0200

----------------------------------------------------------------------
 .../james/JamesCapabilitiesServerTest.java      | 41 ++++++++++----------
 1 file changed, 21 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/45f43560/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesCapabilitiesServerTest.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesCapabilitiesServerTest.java
b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesCapabilitiesServerTest.java
index 2e07a4f..ebbb0cb 100644
--- a/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesCapabilitiesServerTest.java
+++ b/server/container/guice/cassandra-guice/src/test/java/org/apache/james/JamesCapabilitiesServerTest.java
@@ -52,26 +52,6 @@ public class JamesCapabilitiesServerTest {
     @Rule
     public RuleChain chain = RuleChain.outerRule(temporaryFolder).around(embeddedElasticSearch);
 
-    @Test
-    public void startShouldFailWhenNoMoveCapability() throws Exception {
-        MailboxManager mailboxManager = mock(MailboxManager.class);
-        when(mailboxManager.getSupportedCapabilities())
-            .thenReturn(ImmutableList.of(MailboxManager.Capabilities.Basic));
-        server = createCassandraJamesServer(mailboxManager);
-
-        assertThatThrownBy(() -> server.start()).isInstanceOf(IllegalArgumentException.class);
-    }
-
-    @Test
-    public void startShouldSucceedWhenMoveCapability() throws Exception {
-        MailboxManager mailboxManager = mock(MailboxManager.class);
-        when(mailboxManager.getSupportedCapabilities())
-            .thenReturn(ImmutableList.of(MailboxManager.Capabilities.Move));
-        server = createCassandraJamesServer(mailboxManager);
-
-        server.start();
-    }
-
     @After
     public void teardown() {
         server.stop();
@@ -101,4 +81,25 @@ public class JamesCapabilitiesServerTest {
 
                 });
     }
+    
+    @Test
+    public void startShouldFailWhenNoMoveCapability() throws Exception {
+        MailboxManager mailboxManager = mock(MailboxManager.class);
+        when(mailboxManager.getSupportedCapabilities())
+            .thenReturn(ImmutableList.of(MailboxManager.Capabilities.Basic));
+        server = createCassandraJamesServer(mailboxManager);
+
+        assertThatThrownBy(() -> server.start()).isInstanceOf(IllegalArgumentException.class);
+    }
+
+    @Test
+    public void startShouldSucceedWhenMoveCapability() throws Exception {
+        MailboxManager mailboxManager = mock(MailboxManager.class);
+        when(mailboxManager.getSupportedCapabilities())
+            .thenReturn(ImmutableList.of(MailboxManager.Capabilities.Move));
+        server = createCassandraJamesServer(mailboxManager);
+
+        server.start();
+    }
+
 }


---------------------------------------------------------------------
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