james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [08/11] james-project git commit: Revert "JAMES-1862 Use assertj in StartTls tests"
Date Tue, 06 Dec 2016 10:42:13 GMT
Revert "JAMES-1862 Use assertj in StartTls tests"

This reverts commit 59ad40cefd911e5c840bcaa6d3ec845af39f699e.


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

Branch: refs/heads/master
Commit: a69a8131c5008cd77a69c881a79cee88bf7da081
Parents: d5f1da4
Author: Antoine Duprat <aduprat@apache.org>
Authored: Tue Dec 6 11:41:11 2016 +0100
Committer: Antoine Duprat <aduprat@apache.org>
Committed: Tue Dec 6 11:41:11 2016 +0100

----------------------------------------------------------------------
 protocols/smtp/pom.xml                          | 27 ++++++++------------
 .../smtp/netty/NettyStartTlsSMTPServerTest.java | 24 ++++++++++-------
 2 files changed, 26 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/a69a8131/protocols/smtp/pom.xml
----------------------------------------------------------------------
diff --git a/protocols/smtp/pom.xml b/protocols/smtp/pom.xml
index 7adc77b..c028f35 100644
--- a/protocols/smtp/pom.xml
+++ b/protocols/smtp/pom.xml
@@ -39,6 +39,17 @@
             <artifactId>protocols-api</artifactId>
         </dependency>
         <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <optional>true</optional>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-net</groupId>
+            <artifactId>commons-net</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.apache.james.protocols</groupId>
             <artifactId>protocols-api</artifactId>
             <scope>test</scope>
@@ -50,16 +61,6 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>commons-net</groupId>
-            <artifactId>commons-net</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <scope>test</scope>
@@ -69,12 +70,6 @@
             <artifactId>mail</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <version>${assertj-1.version}</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <build>

http://git-wip-us.apache.org/repos/asf/james-project/blob/a69a8131/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
----------------------------------------------------------------------
diff --git a/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
b/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
index c9dda94..41f3b9c 100644
--- a/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
+++ b/protocols/smtp/src/test/java/org/apache/james/protocols/smtp/netty/NettyStartTlsSMTPServerTest.java
@@ -18,7 +18,8 @@
  ****************************************************************/
 package org.apache.james.protocols.smtp.netty;
 
-import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.net.InetSocketAddress;
 import java.net.Socket;
@@ -87,10 +88,10 @@ public class NettyStartTlsSMTPServerTest {
             
             SMTPSClient client = createClient();
             client.connect(address.getAddress().getHostAddress(), address.getPort());
-            assertThat(SMTPReply.isPositiveCompletion(client.getReplyCode())).isTrue();
+            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
             
             client.sendCommand("EHLO localhost");
-            assertThat(SMTPReply.isPositiveCompletion(client.getReplyCode())).isTrue();
+            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
             
             boolean startTLSAnnounced = false;
             for (String reply: client.getReplyStrings()) {
@@ -99,15 +100,16 @@ public class NettyStartTlsSMTPServerTest {
                     break;
                 }
             }
-            assertThat(startTLSAnnounced).isTrue();
-            assertThat(client.execTLS()).isTrue();
+            assertTrue(startTLSAnnounced);
+            
+            assertTrue(client.execTLS());
             
             client.quit();
-            assertThat(SMTPReply.isPositiveCompletion(client.getReplyCode()))
-                .as("Reply="+ client.getReplyString())
-                .isTrue();
+            assertTrue("Reply="+ client.getReplyString(), SMTPReply.isPositiveCompletion(client.getReplyCode()));
             
             client.disconnect();
+
+
         } finally {
             if (server != null) {
                 server.unbind();
@@ -154,7 +156,11 @@ public class NettyStartTlsSMTPServerTest {
             transport.connect(new Socket(address.getHostName(), address.getPort()));
             transport.sendMessage(message, rcpts);
             
-            assertThat(hook.getQueued()).hasSize(1);
+           
+            assertEquals(1, hook.getQueued().size());
+            
+
+
         } finally {
             if (server != null) {
                 server.unbind();


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