james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1134623 - /james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/DecoderUtilsTest.java
Date Sat, 11 Jun 2011 13:13:25 GMT
Author: norman
Date: Sat Jun 11 13:13:25 2011
New Revision: 1134623

URL: http://svn.apache.org/viewvc?rev=1134623&view=rev
Log:
Return tagged BAD if a client tries to set/unset the recent flag via the STORE command. See
IMAP-316

Modified:
    james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/DecoderUtilsTest.java

Modified: james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/DecoderUtilsTest.java
URL: http://svn.apache.org/viewvc/james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/DecoderUtilsTest.java?rev=1134623&r1=1134622&r2=1134623&view=diff
==============================================================================
--- james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/DecoderUtilsTest.java
(original)
+++ james/imap/trunk/message/src/test/java/org/apache/james/imap/decode/DecoderUtilsTest.java
Sat Jun 11 13:13:25 2011
@@ -37,16 +37,17 @@ public class DecoderUtilsTest {
 
     private static final String A_CUSTOM_FLAG = "Another";
 
-    private static final String FLAG_MESSAGE = "RFC3501 specifies that \\Recent flag cannot
be set by the client but accept liberally for better compatibility.";
-
 
     
     @Test
-    public void testSetRecentFlag() throws Exception {
+    public void testSetRecentFlag() {
         Flags flags = new Flags();
-        DecoderUtils.setFlag("\\Recent", flags);
-        assertFalse(FLAG_MESSAGE, flags.contains("\\Recent"));
-        assertFalse(FLAG_MESSAGE, flags.contains(Flags.Flag.RECENT));
+        try {
+            DecoderUtils.setFlag("\\Recent", flags);
+            fail();
+        } catch (DecodingException e) {
+            // expected
+        }
     }
 
     @Test



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