james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [1/5] james-project git commit: JAMES-1791 Support inline attachments
Date Fri, 08 Jul 2016 10:59:15 GMT
Repository: james-project
Updated Branches:
  refs/heads/master 85aeb1e45 -> 1c294ddc0


http://git-wip-us.apache.org/repos/asf/james-project/blob/896bc961/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/MailboxMessageTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/MailboxMessageTest.java
b/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/MailboxMessageTest.java
index eae0c49..b11edcf 100644
--- a/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/MailboxMessageTest.java
+++ b/server/protocols/jmap/src/test/java/org/apache/james/jmap/model/MailboxMessageTest.java
@@ -35,6 +35,7 @@ import org.apache.james.jmap.utils.HtmlTextExtractor;
 import org.apache.james.mailbox.store.TestId;
 import org.apache.james.mailbox.store.mail.model.AttachmentId;
 import org.apache.james.mailbox.store.mail.model.MailboxMessage;
+import org.apache.james.mailbox.store.mail.model.MessageAttachment;
 import org.apache.james.mailbox.store.mail.model.impl.PropertyBuilder;
 import org.apache.james.mailbox.store.mail.model.impl.SimpleMailboxMessage;
 import org.junit.Before;
@@ -416,12 +417,18 @@ public class MailboxMessageTest {
                 .blobId(blodId)
                 .size(payload.length())
                 .type(type)
+                .cid("cid")
+                .isInline(true)
                 .build();
         Message testee = messageFactory.fromMailboxMessage(testMail,
-                ImmutableList.of(org.apache.james.mailbox.store.mail.model.Attachment.builder()
-                        .attachmentId(AttachmentId.from(blodId))
-                        .bytes(payload.getBytes())
-                        .type(type)
+                ImmutableList.of(MessageAttachment.builder()
+                        .attachment(org.apache.james.mailbox.store.mail.model.Attachment.builder()
+                            .attachmentId(AttachmentId.from(blodId))
+                            .bytes(payload.getBytes())
+                            .type(type)
+                            .build())
+                        .cid("cid")
+                        .isInline(true)
                         .build()), 
                 x -> MessageId.of("user|box|" + x));
 


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