You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2015/07/03 17:02:04 UTC
svn commit: r1689035 - in /james/mpt/trunk/impl/imap-mailbox:
cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/
core/src/main/java/org/apache/james/mpt/imapmailbox/suite/
core/src/main/resources/org/apache/james/imap/scripts/
Author: btellier
Date: Fri Jul 3 15:02:03 2015
New Revision: 1689035
URL: http://svn.apache.org/r1689035
Log:
MPT-20 Integration tests for user flags
Added:
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test
Modified:
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java
james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
Modified: james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java?rev=1689035&r1=1689034&r2=1689035&view=diff
==============================================================================
--- james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java (original)
+++ james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java Fri Jul 3 15:02:03 2015
@@ -1,9 +1,71 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
package org.apache.james.mpt.imapmailbox.cassandra;
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
+import org.apache.james.mpt.imapmailbox.suite.Rename;
+import org.apache.james.mpt.imapmailbox.suite.Search;
+import org.apache.james.mpt.imapmailbox.suite.Security;
+import org.apache.james.mpt.imapmailbox.suite.Select;
+import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
+import org.apache.james.mpt.imapmailbox.suite.SelectedState;
+import org.apache.james.mpt.imapmailbox.suite.UidSearch;
+import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
+import org.apache.onami.test.OnamiSuite;
import org.apache.onami.test.annotation.GuiceModules;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+@RunWith(OnamiSuite.class)
+@Suite.SuiteClasses({
+ AuthenticatedState.class,
+ ConcurrentSessions.class,
+ Events.class,
+ Expunge.class,
+ Fetch.class,
+ FetchBodySection.class,
+ FetchBodyStructure.class,
+ FetchHeaders.class,
+ Listing.class,
+ NonAuthenticatedState.class,
+ PartialFetch.class,
+ Rename.class,
+ Search.class,
+ Security.class,
+ Select.class,
+ SelectedInbox.class,
+ SelectedState.class,
+ UidSearch.class,
+ UserFlagsSupport.class
+})
@GuiceModules({ CassandraMailboxTestModule.class })
-public class CassandraMailboxTest extends AbstractMailboxTest {
+public class CassandraMailboxTest {
}
Modified: james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java?rev=1689035&r1=1689034&r2=1689035&view=diff
==============================================================================
--- james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java (original)
+++ james/mpt/trunk/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java Fri Jul 3 15:02:03 2015
@@ -1,3 +1,22 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
package org.apache.james.mpt.imapmailbox.cassandra;
import org.apache.james.mpt.api.HostSystem;
Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java?rev=1689035&view=auto
==============================================================================
--- james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java (added)
+++ james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java Fri Jul 3 15:02:03 2015
@@ -0,0 +1,43 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.james.mpt.imapmailbox.suite;
+
+import com.google.inject.Inject;
+import java.util.Locale;
+
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.junit.Test;
+
+public class UserFlagsSupport extends BaseAuthenticatedState {
+
+ @Inject
+ private static HostSystem system;
+
+ public UserFlagsSupport() throws Exception {
+ super(system);
+ }
+
+ @Test
+ public void testUserFlagsSupport() throws Exception {
+ scriptTest("UserFlagsSupport", Locale.US);
+ }
+
+}
Added: james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test
URL: http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test?rev=1689035&view=auto
==============================================================================
--- james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test (added)
+++ james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/UserFlagsSupport.test Fri Jul 3 15:02:03 2015
@@ -0,0 +1,61 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one #
+# or more contributor license agreements. See the NOTICE file #
+# distributed with this work for additional information #
+# regarding copyright ownership. The ASF licenses this file #
+# to you under the Apache License, Version 2.0 (the #
+# "License"); you may not use this file except in compliance #
+# with the License. You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, #
+# software distributed under the License is distributed on an #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY #
+# KIND, either express or implied. See the License for the #
+# specific language governing permissions and limitations #
+# under the License. #
+################################################################
+
+C: A2 CREATE testmailbox
+S: A2 OK CREATE completed\.
+
+C: A3 SELECT testmailbox
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY (.)*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen \\\*\)\] Limited
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: A3 OK \[READ-WRITE\] SELECT completed\.
+
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <ti...@example.org>
+C: To: Samual Smith <sa...@example.org>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Simple Email
+C:
+C: This is a very simple email.
+C:
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: A4 OK (\[.+\] )?APPEND completed\.
+
+C: A5 STORE 1 FLAGS (userflag)
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen userflag\)
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen userflag \\\*\)\] Limited
+S: \* 1 FETCH \(FLAGS \(\\Recent userflag\)\)
+S: A5 OK STORE completed\.
+
+C: A6 FETCH 1:1 (FLAGS)
+S: \* 1 FETCH \(FLAGS \(\\Recent userflag\)\)
+S: A6 OK FETCH completed.
+
+C: A7 STORE 1 FLAGS ()
+S: \* 1 FETCH \(FLAGS \(\\Recent\)\)
+S: A7 OK STORE completed\.
+
+C: A8 FETCH 1:1 (FLAGS)
+S: \* 1 FETCH \(FLAGS \(\\Recent\)\)
+S: A8 OK FETCH completed.
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org