james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject svn commit: r1685953 - /james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/mail/model/AbstractMessageMapperTest.java
Date Wed, 17 Jun 2015 09:00:19 GMT
Author: btellier
Date: Wed Jun 17 09:00:18 2015
New Revision: 1685953

URL: http://svn.apache.org/r1685953
Log:
MAILBOX-238 Add test to ensure copied message are marked as RECENT at the mapper level

Modified:
    james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/mail/model/AbstractMessageMapperTest.java

Modified: james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/mail/model/AbstractMessageMapperTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/mail/model/AbstractMessageMapperTest.java?rev=1685953&r1=1685952&r2=1685953&view=diff
==============================================================================
--- james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/mail/model/AbstractMessageMapperTest.java
(original)
+++ james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/mail/model/AbstractMessageMapperTest.java
Wed Jun 17 09:00:18 2015
@@ -439,6 +439,34 @@ public abstract class AbstractMessageMap
         assertThat(messageMapper.countUnseenMessagesInMailbox(benwaInboxMailbox)).isEqualTo(0);
     }
 
+    @Ignore("See JWC-147 : RFC3501 Section 6.4.7 : Copied messages should be marked as recent")
+    @Test
+    public void copiedMessageShouldBeMarkedAsRecent() throws MailboxException {
+        MessageMetaData metaData = messageMapper.copy(benwaInboxMailbox, new SimpleMessage<Id>(benwaInboxMailbox,
message6));
+        assertThat(
+            messageMapper.findInMailbox(benwaInboxMailbox,
+                MessageRange.one(metaData.getUid()),
+                MessageMapper.FetchType.Metadata,
+                LIMIT
+            ).next()
+            .isRecent()
+        ).isTrue();
+    }
+
+    @Test
+    public void copiedRecentMessageShouldBeMarkedAsRecent() throws MailboxException {
+        message6.setFlags(new Flags(Flags.Flag.RECENT));
+        MessageMetaData metaData = messageMapper.copy(benwaInboxMailbox, new SimpleMessage<Id>(benwaInboxMailbox,
message6));
+        assertThat(
+            messageMapper.findInMailbox(benwaInboxMailbox,
+                MessageRange.one(metaData.getUid()),
+                MessageMapper.FetchType.Metadata,
+                LIMIT
+            ).next()
+                .isRecent()
+        ).isTrue();
+    }
+
     @Test
     public void flagsReplacementShouldReplaceStoredMessageFlags() throws MailboxException
{
         saveMessages();



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