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 87b3678f88f424d29eb91da91e0b009eae29beaa
Author: Benoit Tellier <[email protected]>
AuthorDate: Wed Nov 11 11:39:05 2020 +0700

    JAMES-3373 Avoid using hamcrest
---
 .../james/jmap/rfc8621/contract/DownloadContract.scala    | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git 
a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/DownloadContract.scala
 
b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/DownloadContract.scala
index 20579b9..f10ef4d 100644
--- 
a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/DownloadContract.scala
+++ 
b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/DownloadContract.scala
@@ -36,7 +36,7 @@ import org.apache.james.mailbox.model.{MailboxACL, 
MailboxPath, MessageId}
 import org.apache.james.modules.{ACLProbeImpl, MailboxProbeImpl}
 import org.apache.james.utils.DataProbeImpl
 import org.assertj.core.api.Assertions.assertThat
-import org.hamcrest.Matchers.{containsString, emptyOrNullString}
+import org.hamcrest.Matchers.containsString
 import org.junit.jupiter.api.{BeforeEach, Test}
 
 object DownloadContract {
@@ -303,14 +303,17 @@ trait DownloadContract {
         ClassLoader.getSystemResourceAsStream("eml/multipart_simple.eml")))
       .getMessageId
 
-    `given`
+    val contentDisposition = `given`
       .basePath("")
       .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
     .when
       .get(s"/download/$accountId/${messageId.serialize()}_3")
     .`then`
       .statusCode(SC_OK)
-      .header("Content-Disposition",  emptyOrNullString())
+      .extract()
+      .header("Content-Disposition")
+
+    assertThat(contentDisposition).isNullOrEmpty()
   }
 
   @Test
@@ -342,14 +345,16 @@ trait DownloadContract {
         ClassLoader.getSystemResourceAsStream("eml/multipart_simple.eml")))
       .getMessageId
 
-    `given`
+    val contentDisposition = `given`
       .basePath("")
       .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
     .when
       .get(s"/download/$accountId/${messageId.serialize()}")
     .`then`
       .statusCode(SC_OK)
-      .header("Content-Disposition", emptyOrNullString())
+      .extract().header("Content-Disposition")
+
+    assertThat(contentDisposition).isNullOrEmpty()
   }
 
   @Test


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to