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 ad...@apache.org on 2017/07/07 08:24:15 UTC
[01/21] james-project git commit: MPT-39 Handle issue tracking for
too long mailboxes names
Repository: james-project
Updated Branches:
refs/heads/master f2cca215c -> 3a70ae82d
MPT-39 Handle issue tracking for too long mailboxes names
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/ae336763
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/ae336763
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/ae336763
Branch: refs/heads/master
Commit: ae3367632aac3c4a91fe23105b5e3dcea80e4787
Parents: 6a23a1b
Author: benwa <bt...@linagora.com>
Authored: Fri Jun 23 10:33:48 2017 +0700
Committer: Matthieu Baechler <ma...@apache.org>
Committed: Thu Jul 6 10:32:17 2017 -0400
----------------------------------------------------------------------
.../CassandraMailboxWithLongNameSuccess.java | 34 -------------------
.../suite/MailboxWithLongNameSuccess.java | 3 --
.../hbase/HBaseMailboxWithLongNameSuccess.java | 34 -------------------
.../InMemoryMailboxWithLongNameError.java | 34 -------------------
.../jpa/JpaMailboxWithLongNameError.java | 2 +-
.../jpa/JpaMailboxWithLongNameSuccess.java | 34 -------------------
.../LuceneMailboxWithLongNameError.java | 2 +-
.../LuceneMailboxWithLongNameSuccess.java | 35 --------------------
.../MaildirMailboxWithLongNameError.java | 2 +-
.../MaildirMailboxWithLongNameSuccess.java | 34 -------------------
10 files changed, 3 insertions(+), 211 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
deleted file mode 100644
index 1be29c0..0000000
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.james.mpt.imapmailbox.cassandra;
-
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-@Ignore("do we have a JIRA for that ?")
-public class CassandraMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
-
- private ImapHostSystem system;
-
- @Before
- public void setUp() throws Exception {
- Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
- system = injector.getInstance(ImapHostSystem.class);
- super.setUp();
- }
-
- @Override
- protected ImapHostSystem createImapHostSystem() {
- return system;
- }
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
index 92c4e53..8366ea1 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
@@ -26,10 +26,8 @@ import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
-@Ignore("why ?")
public abstract class MailboxWithLongNameSuccess implements ImapTestConstants {
protected abstract ImapHostSystem createImapHostSystem();
@@ -45,7 +43,6 @@ public abstract class MailboxWithLongNameSuccess implements ImapTestConstants {
.withLocale(Locale.US);
BasicImapCommands.welcome(simpleScriptedTestProtocol);
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
- BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
@Test
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
deleted file mode 100644
index 6c76d12..0000000
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.james.mpt.imapmailbox.hbase;
-
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-@Ignore("do we have a JIRA for that ?")
-public class HBaseMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
-
- private ImapHostSystem system;
-
- @Before
- public void setUp() throws Exception {
- Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
- system = injector.getInstance(ImapHostSystem.class);
- super.setUp();
- }
-
- @Override
- protected ImapHostSystem createImapHostSystem() {
- return system;
- }
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java
deleted file mode 100644
index 7971a6e..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.james.mpt.imapmailbox.inmemory;
-
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-@Ignore("why ?")
-public class InMemoryMailboxWithLongNameError extends MailboxWithLongNameError {
-
- private ImapHostSystem system;
-
- @Before
- public void setUp() throws Exception {
- Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
- system = injector.getInstance(ImapHostSystem.class);
- super.setUp();
- }
-
- @Override
- protected ImapHostSystem createImapHostSystem() {
- return system;
- }
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
index bfea2cb..4c6bea9 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
@@ -9,7 +9,7 @@ import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why ?")
+@Ignore("MAILBOX-300 JPA should fail gracefully when too long mailbox name")
public class JpaMailboxWithLongNameError extends MailboxWithLongNameError {
private ImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
deleted file mode 100644
index 7ad407f..0000000
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.james.mpt.imapmailbox.jpa;
-
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-@Ignore("why")
-public class JpaMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
-
- private ImapHostSystem system;
-
- @Before
- public void setUp() throws Exception {
- Injector injector = Guice.createInjector(new JpaMailboxTestModule());
- system = injector.getInstance(ImapHostSystem.class);
- super.setUp();
- }
-
- @Override
- protected ImapHostSystem createImapHostSystem() {
- return system;
- }
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
index 3e92189..0530758 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
@@ -9,7 +9,7 @@ import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why ?")
+@Ignore("MAILBOX-300 JPA should fail gracefully when too long mailbox name")
public class LuceneMailboxWithLongNameError extends MailboxWithLongNameError {
private ImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameSuccess.java
deleted file mode 100644
index 355b0a6..0000000
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameSuccess.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.james.mpt.imapmailbox.lucenesearch;
-
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-@Ignore("why")
-public class LuceneMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
-
- private ImapHostSystem system;
-
- @Before
- public void setUp() throws Exception {
- Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
- system = injector.getInstance(ImapHostSystem.class);
- system.beforeTest();
- super.setUp();
- }
-
- @Override
- protected ImapHostSystem createImapHostSystem() {
- return system;
- }
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
index e67b8cc..854fdfc 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
@@ -9,7 +9,7 @@ import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why ?")
+@Ignore("MAILBOX-299 Maildir should fail gracefully when too long mailbox name")
public class MaildirMailboxWithLongNameError extends MailboxWithLongNameError {
private ImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/ae336763/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameSuccess.java
deleted file mode 100644
index 35b1176..0000000
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameSuccess.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package org.apache.james.mpt.imapmailbox.maildir;
-
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-@Ignore("why")
-public class MaildirMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
-
- private ImapHostSystem system;
-
- @Before
- public void setUp() throws Exception {
- Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
- system = injector.getInstance(ImapHostSystem.class);
- super.setUp();
- }
-
- @Override
- protected ImapHostSystem createImapHostSystem() {
- return system;
- }
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[07/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
deleted file mode 100644
index a15614b..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************
- * 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.inmemory;
-
-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.QuotaTest;
-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.onami.test.OnamiSuite;
-import org.apache.james.mpt.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,
- QuotaTest.class
-})
-@GuiceModules({ InMemoryMailboxTestModule.class })
-public class InMemoryMailboxEventAsynchronousTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
deleted file mode 100644
index ea55f7d..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxEventAsynchronousTestModule.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- * 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.inmemory;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.inmemory.host.InMemoryEventAsynchronousHostSystem;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Provides;
-import com.google.inject.Singleton;
-
-public class InMemoryMailboxEventAsynchronousTestModule extends AbstractModule {
-
- @Override
- protected void configure() {
- bind(HostSystem.class).to(ImapHostSystem.class);
- }
-
- @Provides
- @Singleton
- public ImapHostSystem provideHostSystem() throws Exception {
- return InMemoryEventAsynchronousHostSystem.build();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTest.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTest.java
deleted file mode 100644
index 57f71dc..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************
- * 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.inmemory;
-
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
-import org.apache.james.mpt.imapmailbox.suite.Condstore;
-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.MailboxAnnotation;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
-import org.apache.james.mpt.imapmailbox.suite.Move;
-import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
-import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
-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.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runners.Suite.SuiteClasses;
-
-@GuiceModules({ InMemoryMailboxTestModule.class })
-@SuiteClasses({
- AuthenticatedState.class,
- AuthenticatePlain.class,
- ConcurrentSessions.class,
- Condstore.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,
- QuotaTest.class,
- UserFlagsSupport.class,
- Move.class,
- SelectedInbox.class,
- SelectedState.class,
- UidSearch.class,
- MailboxAnnotation.class,
- MailboxWithLongNameSuccess.class
-})
-public class InMemoryMailboxTest extends AbstractMailboxTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java
new file mode 100644
index 0000000..7971a6e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameError.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class InMemoryMailboxWithLongNameError extends MailboxWithLongNameError {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..79ae25b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java
new file mode 100644
index 0000000..bf23e03
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Move;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryMove extends Move {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java
new file mode 100644
index 0000000..686ffb7
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryNonAuthenticatedState extends NonAuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java
new file mode 100644
index 0000000..f1f97ec
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryPartialFetch extends PartialFetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
new file mode 100644
index 0000000..16f0945
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryQuotaTest extends QuotaTest {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
new file mode 100644
index 0000000..dff16d6
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Rename;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryRename extends Rename {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
new file mode 100644
index 0000000..ca51c25
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Search;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySearch extends Search {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java
new file mode 100644
index 0000000..da81eca
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Security;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySecurity extends Security {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java
new file mode 100644
index 0000000..9be071e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Select;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySelect extends Select {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java
new file mode 100644
index 0000000..d423951
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySelectedInbox extends SelectedInbox {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java
new file mode 100644
index 0000000..b444d5f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemorySelectedState extends SelectedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java
new file mode 100644
index 0000000..f45cf0a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryUidSearch extends UidSearch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java
new file mode 100644
index 0000000..29b871d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryUidSearchOnIndex extends UidSearchOnIndex {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java
new file mode 100644
index 0000000..191f8eb
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryUserFlagsSupport extends UserFlagsSupport {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryEventAsynchronousHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryEventAsynchronousHostSystem.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryEventAsynchronousHostSystem.java
deleted file mode 100644
index 6393d50..0000000
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/host/InMemoryEventAsynchronousHostSystem.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************
- * 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.inmemory.host;
-
-import org.apache.james.imap.api.process.ImapProcessor;
-import org.apache.james.imap.encode.main.DefaultImapEncoderFactory;
-import org.apache.james.imap.main.DefaultImapDecoderFactory;
-import org.apache.james.imap.processor.main.DefaultImapProcessorFactory;
-import org.apache.james.mailbox.acl.GroupMembershipResolver;
-import org.apache.james.mailbox.acl.MailboxACLResolver;
-import org.apache.james.mailbox.acl.SimpleGroupMembershipResolver;
-import org.apache.james.mailbox.acl.UnionMailboxACLResolver;
-import org.apache.james.mailbox.exception.MailboxException;
-import org.apache.james.mailbox.inmemory.InMemoryMailboxSessionMapperFactory;
-import org.apache.james.mailbox.inmemory.InMemoryMessageId;
-import org.apache.james.mailbox.inmemory.quota.InMemoryCurrentQuotaManager;
-import org.apache.james.mailbox.inmemory.quota.InMemoryPerUserMaxQuotaManager;
-import org.apache.james.mailbox.model.MailboxConstants;
-import org.apache.james.mailbox.model.MailboxPath;
-import org.apache.james.mailbox.quota.QuotaRootResolver;
-import org.apache.james.mailbox.store.StoreMailboxManager;
-import org.apache.james.mailbox.store.StoreSubscriptionManager;
-import org.apache.james.mailbox.store.event.AsynchronousEventDelivery;
-import org.apache.james.mailbox.store.event.DefaultDelegatingMailboxListener;
-import org.apache.james.mailbox.store.mail.model.impl.MessageParser;
-import org.apache.james.mailbox.store.quota.CurrentQuotaCalculator;
-import org.apache.james.mailbox.store.quota.DefaultQuotaRootResolver;
-import org.apache.james.mailbox.store.quota.ListeningCurrentQuotaUpdater;
-import org.apache.james.mailbox.store.quota.StoreQuotaManager;
-import org.apache.james.metrics.logger.DefaultMetricFactory;
-import org.apache.james.mpt.api.ImapFeatures;
-import org.apache.james.mpt.api.ImapFeatures.Feature;
-import org.apache.james.mpt.host.JamesImapHostSystem;
-import org.apache.james.mpt.imapmailbox.MailboxCreationDelegate;
-
-public class InMemoryEventAsynchronousHostSystem extends JamesImapHostSystem {
-
- private static final ImapFeatures SUPPORTED_FEATURES = ImapFeatures.of(Feature.NAMESPACE_SUPPORT);
-
- private StoreMailboxManager mailboxManager;
- private InMemoryPerUserMaxQuotaManager perUserMaxQuotaManager;
-
- public static JamesImapHostSystem build() throws Exception {
- return new InMemoryEventAsynchronousHostSystem();
- }
-
- private InMemoryEventAsynchronousHostSystem() throws MailboxException {
- initFields();
- }
-
- @Override
- protected void resetData() throws Exception {
- initFields();
- }
-
- private void initFields() throws MailboxException {
- InMemoryMailboxSessionMapperFactory factory = new InMemoryMailboxSessionMapperFactory();
- MailboxACLResolver aclResolver = new UnionMailboxACLResolver();
- GroupMembershipResolver groupMembershipResolver = new SimpleGroupMembershipResolver();
- MessageParser messageParser = new MessageParser();
-
- mailboxManager = new StoreMailboxManager(factory, authenticator, authorizator, aclResolver, groupMembershipResolver, messageParser,
- new InMemoryMessageId.Factory(), MailboxConstants.DEFAULT_LIMIT_ANNOTATIONS_ON_MAILBOX, MailboxConstants.DEFAULT_LIMIT_ANNOTATION_SIZE);
- QuotaRootResolver quotaRootResolver = new DefaultQuotaRootResolver(factory);
-
- perUserMaxQuotaManager = new InMemoryPerUserMaxQuotaManager();
-
- InMemoryCurrentQuotaManager currentQuotaManager = new InMemoryCurrentQuotaManager(
- new CurrentQuotaCalculator(factory, quotaRootResolver),
- mailboxManager);
-
- StoreQuotaManager quotaManager = new StoreQuotaManager();
- quotaManager.setMaxQuotaManager(perUserMaxQuotaManager);
- quotaManager.setCurrentQuotaManager(currentQuotaManager);
-
- ListeningCurrentQuotaUpdater quotaUpdater = new ListeningCurrentQuotaUpdater();
- quotaUpdater.setCurrentQuotaManager(currentQuotaManager);
- quotaUpdater.setQuotaRootResolver(quotaRootResolver);
-
- mailboxManager.setQuotaRootResolver(quotaRootResolver);
- mailboxManager.setQuotaManager(quotaManager);
- mailboxManager.setQuotaUpdater(quotaUpdater);
-
- mailboxManager.setDelegatingMailboxListener(new DefaultDelegatingMailboxListener(new AsynchronousEventDelivery(10)));
-
- mailboxManager.init();
-
- final ImapProcessor defaultImapProcessorFactory = DefaultImapProcessorFactory.createDefaultProcessor(
- mailboxManager,
- new StoreSubscriptionManager(factory),
- quotaManager,
- quotaRootResolver,
- new DefaultMetricFactory());
- configure(new DefaultImapDecoderFactory().buildImapDecoder(),
- new DefaultImapEncoderFactory().buildImapEncoder(),
- defaultImapProcessorFactory);
- }
-
- @Override
- public void createMailbox(MailboxPath mailboxPath) throws Exception{
- new MailboxCreationDelegate(mailboxManager).createMailbox(mailboxPath);
- }
-
- @Override
- public boolean supports(Feature... features) {
- return SUPPORTED_FEATURES.supports(features);
- }
-
- @Override
- public void setQuotaLimits(long maxMessageQuota, long maxStorageQuota) throws MailboxException {
- perUserMaxQuotaManager.setDefaultMaxMessage(maxMessageQuota);
- perUserMaxQuotaManager.setDefaultMaxStorage(maxStorageQuota);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
index fcc3621..23f474d 100644
--- a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
+++ b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
@@ -18,12 +18,9 @@
****************************************************************/
package org.apache.james.mpt.imapmailbox.jcr;
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
import org.junit.Ignore;
@Ignore("JWC-130 : JCR mailbox does not correctly release resources + append problems")
-@GuiceModules({ JcrMailboxTestModule.class })
-public class JcrMailboxTest extends AbstractMailboxTest {
+public class JcrMailboxTest {
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
new file mode 100644
index 0000000..3adbede
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaAuthenticatePlain extends AuthenticatePlain {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
new file mode 100644
index 0000000..2589588
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaAuthenticatedState extends AuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
new file mode 100644
index 0000000..83fb9e0
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaConcurrentSessions extends ConcurrentSessions {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
new file mode 100644
index 0000000..6ccec80
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class JpaCondstore extends Condstore {
+
+ private JamesImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(JamesImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected JamesImapHostSystem createJamesImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
new file mode 100644
index 0000000..26c2bbe
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaCopy extends Copy {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
new file mode 100644
index 0000000..90fc55b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaEvents extends Events {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
new file mode 100644
index 0000000..c3d492c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaExpunge extends Expunge {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
new file mode 100644
index 0000000..07cbb01
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaFetch extends Fetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
new file mode 100644
index 0000000..6c25062
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaFetchBodySection extends FetchBodySection {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
new file mode 100644
index 0000000..ef0b382
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaFetchBodyStructure extends FetchBodyStructure {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
new file mode 100644
index 0000000..2747f69
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaFetchHeaders extends FetchHeaders {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
new file mode 100644
index 0000000..521831d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaListing extends Listing {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
new file mode 100644
index 0000000..8449ea1
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaMailboxAnnotation extends MailboxAnnotation {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java
deleted file mode 100644
index f808afd..0000000
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- * 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.jpa;
-
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-
-@GuiceModules({ JpaMailboxTestModule.class })
-public class JpaMailboxTest extends AbstractMailboxTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
new file mode 100644
index 0000000..bfea2cb
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class JpaMailboxWithLongNameError extends MailboxWithLongNameError {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..7ad407f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameSuccess.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why")
+public class JpaMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
new file mode 100644
index 0000000..306f155
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Move;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaMove extends Move {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
new file mode 100644
index 0000000..1187e05
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaNonAuthenticatedState extends NonAuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
new file mode 100644
index 0000000..33b92cb
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaPartialFetch extends PartialFetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
new file mode 100644
index 0000000..a208585
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaQuotaTest extends QuotaTest {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
new file mode 100644
index 0000000..da70220
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Rename;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaRename extends Rename {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
new file mode 100644
index 0000000..da0223a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Search;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaSearch extends Search {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
new file mode 100644
index 0000000..23a3001
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Security;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaSecurity extends Security {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
new file mode 100644
index 0000000..800fa11
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Select;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaSelect extends Select {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
new file mode 100644
index 0000000..c7e4697
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaSelectedInbox extends SelectedInbox {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
new file mode 100644
index 0000000..7118f81
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaSelectedState extends SelectedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
new file mode 100644
index 0000000..2bd7873
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaUidSearch extends UidSearch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
new file mode 100644
index 0000000..def6b63
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaUidSearchOnIndex extends UidSearchOnIndex {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
new file mode 100644
index 0000000..35bdaca
--- /dev/null
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.jpa;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JpaUserFlagsSupport extends UserFlagsSupport {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new JpaMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
new file mode 100644
index 0000000..9b3bd9b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneAuthenticatePlain extends AuthenticatePlain {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
new file mode 100644
index 0000000..0a83883
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneAuthenticatedState extends AuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[16/21] james-project git commit: MPT-39 Add missing licenses in MPT
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
index 051379a..4c0d518 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
index 1a0c9b9..87aea1b 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
index 19e9ed5..0c82593 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java
index 4e56d03..9927ec8 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java
index 3ca7d4d..f4afb13 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[03/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceProvidedModules.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceProvidedModules.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceProvidedModules.java
deleted file mode 100644
index 1213142..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceProvidedModules.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/****************************************************************
- * 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.onami.test.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * <p>
- * Annotate a <b>public static</b> method to create a Google Guice {@link com.google.inject.Module} provider.
- * </p>
- * <p>
- * The method return type must be one of:
- * <ul>
- * <li>com.google.inject.Module</li>
- * <li>Iterable<com.google.inject.Module></li>
- * <li>com.google.inject.Module[]</li>
- * </p>
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.METHOD)
-public @interface GuiceProvidedModules {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/Mock.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/Mock.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/Mock.java
deleted file mode 100644
index d2e32fa..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/Mock.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************
- * 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.onami.test.annotation;
-
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotate your filed into which {@link org.apache.onami.test.GuiceMockModule} will create and inject the mock object.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.FIELD)
-@Inherited
-public @interface Mock {
-
- /**
- * Annotation class used to mark that no annotation binding is defined.
- */
- public static @interface NoAnnotation {
- }
-
- /**
- * Indicates if this mock object has to be resetted after each test method Default: true
- */
- boolean resetAfter() default true;
-
- /**
- * The name of the method that provides to mock creation.
- */
- String providedBy() default "";
-
- /**
- * The {@link Class} that contains the method {@link Mock#providedBy()}. By default: the filed declaring class.
- */
- Class<?> providerClass() default Object.class;
-
- /**
- * Specifies an annotation {@link Class} that will be used in the <em>Google Guice</em> binder to execute the literal
- * annotating binding.
- */
- Class<? extends Annotation> annotatedWith() default NoAnnotation.class;
-
- /**
- * Specifies an {@link String} annotation that will be used in the <em>Google Guice</em> binder to execute the
- * literal annotating binding via {@link com.google.inject.name.Named} class.
- */
- String namedWith() default "";
-
- /**
- * Specifies TODO
- */
- MockObjType type() default MockObjType.DEFAULT;
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockFramework.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockFramework.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockFramework.java
deleted file mode 100644
index 3e057f7..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockFramework.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- * 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.onami.test.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotate test class to specify you favorite mock framework.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-public @interface MockFramework {
-
- /**
- * Type of mock that JUnice has to create.
- */
- MockType value();
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockObjType.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockObjType.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockObjType.java
deleted file mode 100644
index ce684b1..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockObjType.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************
- * 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.onami.test.annotation;
-
-/**
- * Enumeration class to specifies the preferred mock object.
- */
-public enum MockObjType {
-
- /**
- * @see EasyMock.createMock
- */
- EASY_MOCK_NORMAL,
-
- /**
- * @see EasyMock.createStrictMock
- */
- EASY_MOCK_STRICT,
-
- /**
- * @see EasyMock.createNiceMock
- */
- EASY_MOCK_NICE,
-
- /**
- * Use default mock creation mode
- */
- DEFAULT
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockType.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockType.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockType.java
deleted file mode 100644
index 1082464..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/MockType.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************
- * 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.onami.test.annotation;
-
-/**
- * Enumeration class to specifies your preferred mock framework.
- *
- * @see MockFramework
- */
-public enum MockType {
- /**
- * Identify the Easy Mock framework
- */
- EASY_MOCK,
-
- /**
- * Identify the Mockito framework
- */
- MOCKITO
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/guice/MockMembersInjector.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/guice/MockMembersInjector.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/guice/MockMembersInjector.java
deleted file mode 100644
index 6ce31ac..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/guice/MockMembersInjector.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************
- * 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.onami.test.guice;
-
-import java.lang.reflect.Field;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Map;
-
-import com.google.inject.MembersInjector;
-
-/**
- * Class to inject via google-guice mock members into test cases classes.
- *
- * @param <T> type to inject members of
- */
-public class MockMembersInjector<T> implements MembersInjector<T> {
-
- private final Field field;
-
- private final Map<Field, Object> mockedObjects;
-
- /**
- * Create a new instance.
- *
- * @param field the field that has to be injected.
- * @param mockedObjects the map of mocked object.
- */
- public MockMembersInjector(final Field field, Map<Field, Object> mockedObjects) {
- this.field = field;
- this.mockedObjects = mockedObjects;
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
-
- public Void run() {
- field.setAccessible(true);
- return null;
- }
-
- });
- }
-
- /**
- * {@inheritDoc}
- */
- public void injectMembers(T t) {
- try {
- field.set(t, mockedObjects.get(field));
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/guice/MockTypeListener.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/guice/MockTypeListener.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/guice/MockTypeListener.java
deleted file mode 100644
index 1a6964e..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/guice/MockTypeListener.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************
- * 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.onami.test.guice;
-
-import java.lang.reflect.Field;
-import java.util.Map;
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.reflection.AnnotationHandler;
-import org.apache.james.mpt.onami.test.reflection.ClassVisitor;
-import org.apache.james.mpt.onami.test.reflection.HandleException;
-
-import com.google.inject.TypeLiteral;
-import com.google.inject.spi.TypeEncounter;
-import com.google.inject.spi.TypeListener;
-
-/**
- * <p>
- * {@link TypeListener} implementation.
- * </p>
- * <p>
- * Creates a specific {@link MockMembersInjector} for each {@link Mock} annotation found.
- * </p>
- *
- * @see MockMembersInjector
- * @see Mock
- */
-public class MockTypeListener implements TypeListener {
-
- private final Map<Field, Object> mockedObjects;
-
- /**
- * Creates a new {@code MockTypeListener} instance given a map of mocked objects.
- *
- * @param mockedObjects a map of mocked objects
- */
- public MockTypeListener(Map<Field, Object> mockedObjects) {
- this.mockedObjects = mockedObjects;
- }
-
- /**
- * {@inheritDoc}
- */
- public <I> void hear(final TypeLiteral<I> typeLiteral, final TypeEncounter<I> typeEncounter) {
- try {
- new ClassVisitor()
- .registerHandler(Mock.class, new AnnotationHandler<Mock, Field>() {
-
- public void handle(Mock annotation, Field field)
- throws HandleException {
- typeEncounter.register(new MockMembersInjector<I>(field, mockedObjects));
- }
-
- })
- .visit(typeLiteral.getRawType());
- } catch (HandleException e) {
- typeEncounter.addError(e);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceInjectableClassHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceInjectableClassHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceInjectableClassHandler.java
deleted file mode 100644
index 3cc27f7..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceInjectableClassHandler.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************
- * 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.onami.test.handler;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AccessibleObject;
-import java.lang.reflect.Member;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.james.mpt.onami.test.reflection.AnnotationHandler;
-import org.apache.james.mpt.onami.test.reflection.HandleException;
-
-/**
- * Handler class to handle all {@link com.google.inject.Inject} and {@link javax.inject.Inject} annotations.
- *
- * @param <A> whatever annotation type
- * @see org.apache.onami.test.reflection.ClassVisitor
- */
-public final class GuiceInjectableClassHandler<A extends Annotation> implements AnnotationHandler<A, AccessibleObject> {
-
- private static final Logger LOGGER = Logger.getLogger(GuiceInjectableClassHandler.class.getName());
-
- /**
- * Contains the guice injectable classes founded, after inspection.
- */
- protected final Set<Class<?>> classes = new HashSet<Class<?>>();
-
- /**
- * Return all {@link Class} that contains at last one {@link com.google.inject.Inject} or
- * {@link javax.inject.Inject} annotation.
- *
- * @return {@link Class} array.
- */
- public Class<?>[] getClasses() {
- return classes.toArray(new Class<?>[classes.size()]);
- }
-
- /**
- * {@inheritDoc}
- */
- public void handle(A annotation, AccessibleObject element)
- throws HandleException {
- Class<?> type = null;
-
- if (element instanceof Member) {
- type = ((Member) element).getDeclaringClass();
- }
-
- if (type != null && !classes.contains(type)) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Found injectable type: " + type);
- }
- classes.add(type);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceModuleHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceModuleHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceModuleHandler.java
deleted file mode 100644
index 3181157..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceModuleHandler.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************
- * 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.onami.test.handler;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.reflection.ClassHandler;
-import org.apache.james.mpt.onami.test.reflection.HandleException;
-
-import com.google.inject.Module;
-
-/**
- * Handler class to handle all {@link GuiceModules} annotations.
- *
- * @see org.apache.onami.test.reflection.ClassVisitor
- */
-public final class GuiceModuleHandler implements ClassHandler<GuiceModules> {
-
- private static final Logger LOGGER = Logger.getLogger(GuiceModuleHandler.class.getName());
-
- private final List<Module> modules = new ArrayList<Module>();
-
- /**
- * @return the modules
- */
- public List<Module> getModules() {
- return modules;
- }
-
- /**
- * {@inheritDoc}
- */
- public void handle(GuiceModules annotation, Class<?> element)
- throws HandleException {
- for (Class<? extends Module> module : annotation.value()) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Try to create module: " + module);
- }
- try {
- modules.add(module.newInstance());
- } catch (Exception e) {
- throw new HandleException(e);
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceProvidedModuleHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceProvidedModuleHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceProvidedModuleHandler.java
deleted file mode 100644
index ed9ed7b..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/GuiceProvidedModuleHandler.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************
- * 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.onami.test.handler;
-
-import static java.lang.String.format;
-
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceProvidedModules;
-import org.apache.james.mpt.onami.test.reflection.HandleException;
-import org.apache.james.mpt.onami.test.reflection.MethodHandler;
-
-import com.google.inject.Module;
-import com.google.inject.TypeLiteral;
-
-/**
- * Handler class to handle all {@link GuiceProvidedModules} annotations.
- *
- * @see org.apache.onami.test.reflection.ClassVisitor
- * @see GuiceProvidedModules
- */
-public final class GuiceProvidedModuleHandler implements MethodHandler<GuiceProvidedModules> {
-
- private static final Logger LOGGER = Logger.getLogger(GuiceProvidedModuleHandler.class.getName());
-
- private final List<Module> modules = new ArrayList<Module>();
-
- /**
- * @return the guiceProviderModuleRegistry
- */
- public List<Module> getModules() {
- return modules;
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public void handle(GuiceProvidedModules annotation, Method method)
- throws HandleException {
- final Class<?> returnType = method.getReturnType();
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(format(" Found %s annotated method, checking if return type '%s' is one of ( %s | Iterable<%s> | %s[] )",
- GuiceProvidedModules.class.getSimpleName(),
- returnType.getName(),
- Module.class.getName(),
- Module.class.getName(),
- Module.class.getName()));
- }
-
- if (!Modifier.isPublic(method.getModifiers()) || !Modifier.isStatic(method.getModifiers())) {
- throw new HandleException("Impossible to invoke method: " + method + ", it has to be static and public");
- }
-
- final Class<?> type = method.getDeclaringClass();
-
- try {
- if (Module.class.isAssignableFrom(returnType)) {
- modules.add((Module) method.invoke(type));
- } else if (new TypeLiteral<Iterable<Module>>() {
- }.getRawType().isAssignableFrom(returnType)) {
- addModules((Iterable<Module>) method.invoke(type));
- } else if (new TypeLiteral<Module[]>() {
- }.getRawType().isAssignableFrom(returnType)) {
- addModules((Module[]) method.invoke(type));
- } else {
- throw new ClassCastException(format(" Incompatible return type: %s.\nThe return type must be one of ( %s | Iterable<%s> | %s[] )",
- returnType.getName(),
- Module.class.getName(),
- Module.class.getName(),
- Module.class.getName()));
- }
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Invoked method: " + method.toGenericString());
- }
- } catch (Exception e) {
- throw new HandleException(e);
- }
- }
-
- private void addModules(Iterable<Module> modules) {
- for (Module module : modules) {
- this.modules.add(module);
- }
- }
-
- private void addModules(Module... modules) {
- Collections.addAll(this.modules, modules);
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/MockFrameworkHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/MockFrameworkHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/MockFrameworkHandler.java
deleted file mode 100644
index e6b4433..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/MockFrameworkHandler.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************
- * 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.onami.test.handler;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.james.mpt.onami.test.annotation.MockFramework;
-import org.apache.james.mpt.onami.test.annotation.MockType;
-import org.apache.james.mpt.onami.test.reflection.ClassHandler;
-import org.apache.james.mpt.onami.test.reflection.HandleException;
-
-/**
- * Handler class to handle all {@link MockFramework} annotations.
- *
- * @see org.apache.onami.test.reflection.ClassVisitor
- * @see MockFramework
- */
-public final class MockFrameworkHandler implements ClassHandler<MockFramework> {
-
- private static final Logger LOGGER = Logger.getLogger(MockFrameworkHandler.class.getName());
-
- private MockType mockType;
-
- /**
- * @return the mockType
- */
- public MockType getMockType() {
- return mockType;
- }
-
- /**
- * {@inheritDoc}
- */
- public void handle(MockFramework annotation, Class<?> element)
- throws HandleException {
- if (mockType != null && mockType != annotation.value()) {
- throw new HandleException("Inconsistent mock framework found. " + "Mock framework already set [set: "
- + mockType + " now found: " + annotation.value() + "]");
- }
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Found MockFramework: " + annotation.value());
- }
-
- mockType = annotation.value();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/MockHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/MockHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/MockHandler.java
deleted file mode 100644
index 5b68144..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/handler/MockHandler.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************
- * 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.onami.test.handler;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.util.HashMap;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.mock.MockEngine;
-import org.apache.james.mpt.onami.test.reflection.FieldHandler;
-import org.apache.james.mpt.onami.test.reflection.HandleException;
-
-
-/**
- * Handler class to handle all {@link Mock} annotations.
- *
- * @see org.apache.onami.test.reflection.ClassVisitor
- * @see Mock
- */
-public final class MockHandler implements FieldHandler<Mock> {
-
- private static final Logger LOGGER = Logger.getLogger(MockHandler.class.getName());
-
- private final HashMap<Field, Object> mockedObjects = new HashMap<Field, Object>(1);
-
- /**
- * Return the mocked objects.
- *
- * @param engine the {@link MockEngine}
- * @return the map of mocked objects
- */
- public HashMap<Field, Object> getMockedObject(MockEngine engine) {
- createMockedObjectBymockFramekork(engine);
- return mockedObjects;
- }
-
- private void createMockedObjectBymockFramekork(MockEngine engine) {
- for (Entry<Field, Object> entry : mockedObjects.entrySet()) {
- if (entry.getValue() instanceof Class<?>) {
- Field field = entry.getKey();
- Mock mock = field.getAnnotation(Mock.class);
- mockedObjects.put(entry.getKey(), engine.createMock((Class<?>) entry.getValue(), mock.type()));
- }
- }
- }
-
-
- /**
- * Invoked when the visitor founds an element with a {@link Mock} annotation.
- *
- * @param annotation The {@link Mock} annotation type
- * @param element the {@link Mock} annotated fiels
- * @throws HandleException when an error occurs.
- */
- @SuppressWarnings("unchecked")
- public void handle(final Mock annotation, final Field element)
- throws HandleException {
- final Class<? super Object> type = (Class<? super Object>) element.getDeclaringClass();
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Found annotated field: " + element);
- }
- if (annotation.providedBy().length() > 0) {
- Class<?> providedClass = type;
- if (annotation.providerClass() != Object.class) {
- providedClass = annotation.providerClass();
- }
- try {
- Method method = providedClass.getMethod(annotation.providedBy());
-
- if (!element.getType().isAssignableFrom(method.getReturnType())) {
- throw new HandleException("Impossible to mock %s due to compatibility type, method provider %s#%s returns %s",
- element.getDeclaringClass().getName(),
- providedClass.getName(),
- annotation.providedBy(),
- method.getReturnType().getName());
- }
- try {
- Object mocked = getMockProviderForType(element.getType(), method, type);
- mockedObjects.put(element, mocked);
- } catch (Throwable t) {
- throw new HandleException("Impossible to mock %s, method provider %s#%s raised an error: %s",
- element.getDeclaringClass().getName(),
- providedClass.getName(),
- annotation.providedBy(),
- t);
- }
- } catch (SecurityException e) {
- throw new HandleException("Impossible to mock %s, impossible to access to method provider %s#%s: %s",
- element.getDeclaringClass().getName(),
- providedClass.getName(),
- annotation.providedBy(),
- e);
- } catch (NoSuchMethodException e) {
- throw new HandleException("Impossible to mock %s, the method provider %s#%s doesn't exist.",
- element.getDeclaringClass().getName(),
- providedClass.getName(),
- annotation.providedBy());
- }
- } else {
- mockedObjects.put(element, element.getType());
- }
- }
-
- @SuppressWarnings("unchecked")
- private <T> T getMockProviderForType(T t, Method method, Class<?> cls)
- throws HandleException {
- if (method.getReturnType() == t) {
- try {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" ...invoke Provider method for Mock: " + method.getName());
- }
- if (!Modifier.isPublic(method.getModifiers()) || !Modifier.isStatic(method.getModifiers())) {
- throw new HandleException("Impossible to invoke method %s#%s. The method shuld be 'static public %s %s()",
- cls.getName(),
- method.getName(),
- method.getReturnType().getName(),
- method.getName());
- }
-
- return (T) method.invoke(cls);
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
- throw new HandleException("The method: %s should return type %s", method, t);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/MockEngine.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/MockEngine.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/MockEngine.java
deleted file mode 100644
index c8b5f15..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/MockEngine.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************
- * 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.onami.test.mock;
-
-import org.apache.james.mpt.onami.test.annotation.MockObjType;
-
-/**
- * Interface to specify mock framework class engine.
- *
- * @see org.apache.onami.test.mock.framework.EasyMockFramework
- * @see org.apache.onami.test.mock.framework.MockitoFramework
- */
-public interface MockEngine {
-
- /**
- * Reset the mock objects
- *
- * @param objects to reset.
- */
- void resetMock(Object... objects);
-
- /**
- * Create a typed mock
- *
- * @param <T> Class to mock
- * @param cls Class to mock
- * @param type the {@link MockObjType}
- * @return the mock object
- */
- <T> T createMock(Class<T> cls, MockObjType type);
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/framework/EasyMockFramework.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/framework/EasyMockFramework.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/framework/EasyMockFramework.java
deleted file mode 100644
index 9bd55d8..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/framework/EasyMockFramework.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- * 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.onami.test.mock.framework;
-
-import org.apache.james.mpt.onami.test.annotation.MockObjType;
-import org.apache.james.mpt.onami.test.mock.MockEngine;
-import org.easymock.EasyMock;
-
-/**
- * Specifies the Easy-Mock Framework.
- *
- * @see MockEngine
- */
-public class EasyMockFramework implements MockEngine {
-
- /**
- * {@inheritDoc}
- */
- public void resetMock(Object... objects) {
- EasyMock.reset(objects);
- }
-
- /**
- * {@inheritDoc}
- */
- public <T> T createMock(Class<T> cls, MockObjType type) {
- switch (type) {
- case EASY_MOCK_NICE:
- return EasyMock.createNiceMock(cls);
-
- case EASY_MOCK_STRICT:
- return EasyMock.createStrictMock(cls);
-
- case EASY_MOCK_NORMAL:
- case DEFAULT:
- return EasyMock.createMock(cls);
-
- default:
- throw new IllegalArgumentException("Unsupported mock type '" + type + "' for Easy-Mock Framework.");
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/framework/MockitoFramework.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/framework/MockitoFramework.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/framework/MockitoFramework.java
deleted file mode 100644
index 5e6c5cb..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/mock/framework/MockitoFramework.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************
- * 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.onami.test.mock.framework;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static org.apache.james.mpt.onami.test.annotation.MockObjType.DEFAULT;
-
-import org.apache.james.mpt.onami.test.annotation.MockObjType;
-import org.apache.james.mpt.onami.test.mock.MockEngine;
-import org.mockito.Mockito;
-
-/**
- * Specifies the Mockito Framework.
- *
- * @see MockEngine
- */
-public class MockitoFramework
- implements MockEngine {
-
- /**
- * {@inheritDoc}
- */
- public void resetMock(Object... objects) {
- Mockito.reset(objects);
- }
-
- /**
- * {@inheritDoc}
- */
- public <T> T createMock(Class<T> cls, MockObjType type) {
- checkArgument(DEFAULT == type, "Unsupported mock type '%s' for Mockito Framework.", type);
- return Mockito.mock(cls);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/AnnotationHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/AnnotationHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/AnnotationHandler.java
deleted file mode 100644
index 3ae233f..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/AnnotationHandler.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- * 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.onami.test.reflection;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-
-/**
- * Interface to specify a generic annotation handler.
- *
- * @param <A> whatever annotation type
- * @param <E> the element annotated with an annotation type
- */
-public interface AnnotationHandler<A extends Annotation, E extends AnnotatedElement> {
-
- /**
- * Invoked when {@link ClassVisitor} found an annotation into a class.
- *
- * @param annotation handled annotation
- * @param element the element annotated with input annotation
- * @throws HandleException if an error occurs while processing the annotated element
- * and the related annotation
- */
- void handle(A annotation, E element)
- throws HandleException;
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/ClassHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/ClassHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/ClassHandler.java
deleted file mode 100644
index 23eacb5..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/ClassHandler.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- * 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.onami.test.reflection;
-
-import java.lang.annotation.Annotation;
-
-/**
- * Interface to specify a generic class handler.
- *
- * @param <A> whatever annotation type
- */
-public interface ClassHandler<A extends Annotation> extends AnnotationHandler<A, Class<?>> {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/ClassVisitor.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/ClassVisitor.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/ClassVisitor.java
deleted file mode 100644
index a28e1ef..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/ClassVisitor.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************
- * 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.onami.test.reflection;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.Multimap;
-
-/**
- * <p>
- * Class visitor engine.
- * </p>
- * <p>
- * Visit the input class and all super classes and invokes handler to register annotations.
- * </p>
- */
-public final class ClassVisitor {
-
- private static final String JAVA_PACKAGE = "java";
-
- private static final Logger LOGGER = Logger.getLogger(ClassVisitor.class.getName());
-
- private final Multimap<Class<? extends Annotation>, AnnotationHandler<? extends Annotation, ? extends AnnotatedElement>> handlers =
- ArrayListMultimap.create();
-
- /**
- * Registers an annotation handler.
- *
- * @param <A> whatever annotation type
- * @param annotationType the annotation class to handle
- * @param handler the related annotation handler
- * @return the current {@code ClassVisitor} instance
- */
- public <A extends Annotation> ClassVisitor registerHandler(Class<A> annotationType,
- AnnotationHandler<A, ? extends AnnotatedElement> handler) {
- handlers.put(annotationType, handler);
- return this;
- }
-
- /**
- * Visits all fields, methods and super classes of the input class.
- *
- * @param <T> any type
- * @param type The type
- * @throws HandleException when an error occurs.
- */
- public <T> void visit(final Class<? super T> type)
- throws HandleException {
- checkArgument(type != null, "Type to be visited cannot be null");
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Visit class: " + type);
- }
-
- if (type.getPackage() != null && type.getPackage().getName().startsWith(JAVA_PACKAGE)) {
- return;
- }
-
- handle(type);
- handle(type.getDeclaredFields());
- handle(type.getDeclaredMethods());
-
- visit((Class<? super T>) type.getSuperclass());
- }
-
- @SuppressWarnings("unchecked")
- private void handle(AnnotatedElement... elements)
- throws HandleException {
- for (AnnotatedElement element : elements) {
- for (Annotation annotation : element.getAnnotations()) {
- for (AnnotationHandler<? extends Annotation, ? extends AnnotatedElement> handler : handlers.get(annotation.annotationType())) {
- ((AnnotationHandler<Annotation, AnnotatedElement>) handler).handle(annotation, element);
- }
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/FieldHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/FieldHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/FieldHandler.java
deleted file mode 100644
index 9c98cdc..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/FieldHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- * 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.onami.test.reflection;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-
-/**
- * Interface to specify a generic field handler.
- *
- * @param <A> whatever annotation type
- */
-public interface FieldHandler<A extends Annotation> extends AnnotationHandler<A, Field> {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/HandleException.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/HandleException.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/HandleException.java
deleted file mode 100644
index 8da8143..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/HandleException.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************
- * 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.onami.test.reflection;
-
-import static java.lang.String.format;
-
-/**
- * Exception thrown by a {@link ClassVisitor} when a error occurs.
- */
-public final class HandleException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Constructs a new HandleException with the specified detail message and cause.
- *
- * @param message detail message
- * @param cause the cause
- */
- public HandleException(String message, Throwable cause) {
- super(message, cause);
- }
-
- /**
- * Constructs a new HandleException with the specified detail message.
- *
- * @param message a format string
- * @param args arguments referenced by the format specifiers in the format string
- * @see String#format(String, Object...)
- */
- public HandleException(String message, Object... args) {
- super(format(message, args));
- }
-
- /**
- * Constructs a new HandleException with the specified cause.
- *
- * @param cause the cause
- */
- public HandleException(Throwable cause) {
- super(cause);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/MethodHandler.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/MethodHandler.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/MethodHandler.java
deleted file mode 100644
index 6f43140..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/reflection/MethodHandler.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- * 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.onami.test.reflection;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-
-/**
- * Interface to specify a generic method handler.
- *
- * @param <A> whatever annotation type
- */
-public interface MethodHandler<A extends Annotation> extends AnnotationHandler<A, Method> {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractEmptyTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractEmptyTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractEmptyTestCase.java
deleted file mode 100644
index b6f090e..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractEmptyTestCase.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.logging.LogManager;
-
-import org.junit.BeforeClass;
-
-/**
- * Utility class. Just for logging initialization.
- */
-abstract public class AbstractEmptyTestCase {
-
- @BeforeClass
- public static void initLogging()
- throws Exception {
- LogManager.getLogManager().readConfiguration(new FileInputStream(
- new File(
- "src/test/resources/log4j.properties")));
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractMockTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractMockTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractMockTestCase.java
deleted file mode 100644
index 729a995..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractMockTestCase.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.data.Service;
-import org.easymock.EasyMock;
-
-abstract public class AbstractMockTestCase extends AbstractEmptyTestCase {
-
- // Create and inject a Provided EasyMock
- @Mock(providedBy = "getMock")
- protected Service providedMock;
-
- public static Service getMock() {
- // Create the mock object and inject the dependency via Google-guice into HelloWorld
- return EasyMock.createNiceMock(Service.class);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractMockitoTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractMockitoTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractMockitoTestCase.java
deleted file mode 100644
index a4c0432..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractMockitoTestCase.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.annotation.MockFramework;
-import org.apache.james.mpt.onami.test.annotation.MockType;
-import org.apache.james.mpt.onami.test.data.Service;
-import org.mockito.Mockito;
-
-@MockFramework(MockType.MOCKITO)
-abstract public class AbstractMockitoTestCase extends AbstractEmptyTestCase {
-
- // Create and inject a Provided EasyMock
- @Mock(providedBy = "getMock")
- protected Service providedMock;
-
- // @MockProvider
- public static Service getMock() {
- // Create the mock object and inject the dependency via Google-guice into HelloWorld
- return Mockito.mock(Service.class);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractTestCase.java
deleted file mode 100644
index ec6e0ca..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/AbstractTestCase.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import java.util.ArrayList;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.annotation.GuiceProvidedModules;
-import org.apache.james.mpt.onami.test.data.SimpleModule;
-import org.junit.runner.RunWith;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Module;
-import com.google.inject.name.Names;
-
-@RunWith(OnamiRunner.class)
-@GuiceModules(SimpleModule.class)
-abstract public class AbstractTestCase extends AbstractEmptyTestCase {
-
- @GuiceProvidedModules
- public static Module genericModule() {
- return new AbstractModule() {
- @Override
- protected void configure() {
- bind(String.class).annotatedWith(Names.named("test.info.inject")).toInstance("JUnice = JUnit + Guice");
- }
- };
- }
-
- @GuiceProvidedModules
- public static Iterable<Module> genericModule2() {
- AbstractModule a = new AbstractModule() {
- @Override
- protected void configure() {
- bind(String.class).annotatedWith(Names.named("test.info.inject2")).toInstance("JUnice = JUnit + Guice Iterable");
- }
- };
-
- ArrayList<Module> al = new ArrayList<Module>();
- al.add(a);
- return al;
- }
-
- @GuiceProvidedModules
- public static Module[] genericModule3() {
- AbstractModule a = new AbstractModule() {
- @Override
- protected void configure() {
- bind(String.class).annotatedWith(Names.named("test.info.inject3")).toInstance("JUnice = JUnit + Guice Array");
- }
- };
- return new Module[]{a};
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectDependingMockObjectTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectDependingMockObjectTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectDependingMockObjectTestCase.java
deleted file mode 100644
index 092c98a..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectDependingMockObjectTestCase.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.data.HelloWorld;
-import org.apache.james.mpt.onami.test.data.Service;
-import org.easymock.EasyMock;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Injector;
-import com.google.inject.TypeLiteral;
-
-@RunWith(OnamiRunner.class)
-public class InjectDependingMockObjectTestCase {
-
- @Mock
- static private Service service;
-
- @Inject
- Injector injector;
-
- private HelloWorld helloWorld;
-
- @Before
- public void setUp() {
- final List<Service> list = new ArrayList<Service>();
- list.add(service);
-
- AbstractModule listAbstractModule = new AbstractModule() {
- @Override
- protected void configure() {
- bind(new TypeLiteral<List<Service>>() {
- }).toInstance(list);
- }
- };
-
- Injector cInjector = injector.createChildInjector(listAbstractModule);
- helloWorld = cInjector.getInstance(HelloWorld.class);
- // required for optional dependencies
- cInjector.injectMembers(helloWorld);
- }
-
- @Test
- public void testMock() {
- Assert.assertNotNull(helloWorld);
- Assert.assertNotNull(service);
- EasyMock.expect(service.go()).andReturn("Ciao");
- EasyMock.expectLastCall().once();
-
- EasyMock.replay(service);
- helloWorld.sayHalloByServiceLists();
- EasyMock.verify(service);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectFromSuperClassTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectFromSuperClassTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectFromSuperClassTestCase.java
deleted file mode 100644
index 0561394..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectFromSuperClassTestCase.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import javax.inject.Inject;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import com.google.inject.name.Named;
-
-public class InjectFromSuperClassTestCase extends AbstractTestCase {
-
- @Inject
- @Named("test.info.inject")
- private String info;
-
- @Inject
- @Named("test.info.inject2")
- private String infoFromIterable;
-
- @Inject
- @Named("test.info.inject3")
- private String infoFromArray;
-
- @Test
- public void testInjectFromSuperClass() {
- Assert.assertNotNull(info);
- Assert.assertEquals("JUnice = JUnit + Guice", info);
-
- Assert.assertNotNull(infoFromIterable);
- Assert.assertEquals("JUnice = JUnit + Guice Iterable", infoFromIterable);
-
- Assert.assertNotNull(infoFromArray);
- Assert.assertEquals("JUnice = JUnit + Guice Array", infoFromArray);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectJSR330ModuleClassTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectJSR330ModuleClassTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectJSR330ModuleClassTestCase.java
deleted file mode 100644
index 78a98a0..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectJSR330ModuleClassTestCase.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.name.Names;
-
-@RunWith(OnamiRunner.class)
-public class InjectJSR330ModuleClassTestCase extends AbstractModule {
-
- @Override
- public void configure() {
- bind(Integer.class).annotatedWith(Names.named("numeber.version")).toInstance(10);
- }
-
- @Inject
- @Named("numeber.version")
- private Integer version;
-
- @Test
- public void testInjectModuleClass() {
- Assert.assertNotNull(version);
- Assert.assertEquals(10, version.intValue());
- }
-
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[17/21] james-project git commit: MPT-39 Add missing licenses in MPT
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
index 1371555..2e8f2af 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
index 9586144..bc792ec 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
index 34967ab..ac1c0bb 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
index f346259..29a6a63 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
index 1bc9698..d551d5c 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
index 999e14d..6417687 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
index 0530758..01d4816 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
index 370f3f8..37172ba 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
index 1df51bc..c5ea83a 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
index a7e0b98..c669794 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
index 4c6ad1c..393e73d 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
index ca12fff..d19e85c 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
index 6bab50b..ea12d30 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java
index e8468fe..392c4d5 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java
index 4652549..1f2028c 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java
index 5d02459..561835e 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java
index 008823d..a2a4724 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java
index 2e950fb..9c5087b 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java
index 47802c7..61e89f1 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java
index 3c6452b..93b9492 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java
index a9ac719..3dcc89a 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java
index ee27107..7844082 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java
index e50a9a9..38d1196 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
index 43972d1..ee51fcb 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
@@ -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.maildir;
import org.apache.james.mpt.host.JamesImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java
index 8dd20de..2004bc8 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java
index e497f42..eabedd4 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java
index ce703fc..e224268 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java
index 2983b97..4f6d64f 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java
index d3dee44..ce8a9c3 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java
index 525395c..70574ed 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java
index dd39f1b..43c707a 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java
index a67db7d..f04baf2 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java
index f3413bc..b14e62b 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
index 854fdfc..f20e6a9 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java
index e6186a5..a068b90 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java
index 7fb5f66..162e929 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java
index 87e0c97..168e0a6 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java
index 31c5268..baa1cc9 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java
index 82bb14e..df5b232 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java
index fb12cfb..40b7e41 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java
index 600ddf2..91a5d95 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java
index 7539aa6..dda44a9 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java
@@ -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.maildir;
import org.apache.james.mpt.api.ImapHostSystem;
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[18/21] james-project git commit: MPT-39 Add missing licenses in MPT
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
index 16f0945..193a0ed 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryQuotaTest.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
index dff16d6..79f0b74 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryRename.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
index ca51c25..d5dda8c 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySearch.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java
index da81eca..e7db795 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySecurity.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java
index 9be071e..b24654e 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelect.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java
index d423951..593123d 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedInbox.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java
index b444d5f..13635b6 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemorySelectedState.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java
index f45cf0a..c484d91 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearch.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java
index 29b871d..21bc647 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUidSearchOnIndex.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java
index 191f8eb..94e4ceb 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryUserFlagsSupport.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
index 3adbede..9e9a11c 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatePlain.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
index 2589588..23339e9 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaAuthenticatedState.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
index 83fb9e0..9f96568 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaConcurrentSessions.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
index 8cdee93..1d28c7c 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
@@ -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.jpa;
import org.apache.james.mpt.host.JamesImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
index 26c2bbe..e7c1441 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCopy.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
index 90fc55b..0041632 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaEvents.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
index c3d492c..44eeae1 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaExpunge.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
index 07cbb01..6275ef4 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetch.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
index 6c25062..c25b2d3 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodySection.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
index ef0b382..2c1789e 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchBodyStructure.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
index 2747f69..04a72b6 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaFetchHeaders.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
index 521831d..2fb5544 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaListing.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
index 8449ea1..95fc478 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxAnnotation.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
index 4c6bea9..9bf4ce9 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxWithLongNameError.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
index 306f155..044f70a 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMove.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
index 1187e05..fcc0f67 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaNonAuthenticatedState.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
index 33b92cb..be83b77 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaPartialFetch.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
index a208585..79dea51 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaQuotaTest.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
index da70220..1756f8d 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaRename.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
index da0223a..e700bc5 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSearch.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
index 23a3001..b1b2378 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSecurity.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
index 800fa11..7c1fe54 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelect.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
index c7e4697..369e5e1 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedInbox.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
index 7118f81..7cae74d 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaSelectedState.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
index 2bd7873..189a5c4 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearch.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
index def6b63..ec991ae 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
index 35bdaca..893708f 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaUserFlagsSupport.java
@@ -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.jpa;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
index 9b3bd9b..08befdb 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatePlain.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
index 0a83883..8c64be5 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneAuthenticatedState.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
index 9ac3301..13d70af 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
index 42b12db..bbbb862 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
@@ -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.lucenesearch;
import org.apache.james.mpt.host.JamesImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
index 8f10a2e..824a507 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
index cb4150e..3acde0f 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
index 53f5d84..b775616 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
@@ -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.lucenesearch;
import org.apache.james.mpt.api.ImapHostSystem;
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[19/21] james-project git commit: MPT-39 Add missing licenses in MPT
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
index 0c58987..a2636fe 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
index a21b14c..ae11769 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
@@ -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.hbase;
import org.apache.james.mpt.host.JamesImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
index 252c8e6..90bcf7b 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
index b25f337..104b81a 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
index 5ed5396..2c4cb4b 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
index c985e1a..7d6d099 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
index 7fa1f01..566c69e 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
index 9402b37..deb92ff 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
index 3e82982..4977bf9 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
index d04fd85..6cd7456 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
index 8e48c4c..9114f55 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
index 40d9c3d..faa301f 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
@@ -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.hbase;
import org.apache.james.mpt.api.HostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
index 9e33c2c..ce545e7 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
index 856b04c..3a1dcbb 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
index 0c959c8..6074a99 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
index 4e12099..bab9cfb 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
index 5334bfe..776082d 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
index 8e2f8d8..a8cb517 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
index 7bfe052..fc417f8 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
index f8fab11..ff2148a 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
index 398db0e..a4977da 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
index faddd49..56408d9 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
index 5041583..600e60e 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
index 763975f..ec4b4df 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
index 4272454..3211f4a 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
index d85e19a..2082fca 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
index 9600232..ad0ab04 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
index 3564984..dd341ea 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
index 3ce904a..be80e09 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
index 8b4f625..a293e10 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
@@ -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.inmemory;
import org.apache.james.mpt.host.JamesImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
index 1d72ad9..218423b 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
index d23db49..9f43f9c 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
index 35bcce8..2c11bad 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
index 8313017..b3c8c5a 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
index 0a3150d..c2e1b8d 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
index 22a27a5..5a51101 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
index 94ed875..c66d684 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
index b263205..18845ab 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
index 60be1fa..c6833ca 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java
index 79ae25b..cd56144 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxWithLongNameSuccess.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java
index bf23e03..56afcdd 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMove.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java
index 686ffb7..1f9f2ae 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryNonAuthenticatedState.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java
index f1f97ec..6e85ff1 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryPartialFetch.java
@@ -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.inmemory;
import org.apache.james.mpt.api.ImapHostSystem;
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[09/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
deleted file mode 100644
index 96b65e6..0000000
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/AbstractMailboxTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************
- * 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;
-
-import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
-import org.apache.james.mpt.imapmailbox.suite.Copy;
-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.MailboxAnnotation;
-import org.apache.james.mpt.imapmailbox.suite.Move;
-import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
-import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
-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.james.mpt.onami.test.OnamiSuite;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(OnamiSuite.class)
-@SuiteClasses({
- AuthenticatedState.class,
- ConcurrentSessions.class,
- Copy.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,
- QuotaTest.class,
- UserFlagsSupport.class,
- Move.class,
- SelectedInbox.class,
- SelectedState.class,
- UidSearch.class,
- MailboxAnnotation.class
-})
-public abstract class AbstractMailboxTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
index 2fd93d2..5768825 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
@@ -21,83 +21,85 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mailbox.model.MailboxACL;
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.model.SimpleMailboxACL;
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.apache.james.mpt.imapmailbox.MailboxMessageAppender;
import org.junit.Before;
import org.junit.Test;
-public class ACLCommands implements ImapTestConstants {
+public abstract class ACLCommands implements ImapTestConstants {
+
public static final String OTHER_USER_NAME = "Boby";
public static final String OTHER_USER_PASSWORD = "password";
public static final MailboxPath OTHER_USER_MAILBOX = new MailboxPath("#private", OTHER_USER_NAME, "") ;
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ protected abstract GrantRightsOnHost createGrantRightsOnHost();
- @Inject
+ private ImapHostSystem system;
private GrantRightsOnHost grantRightsOnHost;
private MailboxACL.MailboxACLRights readWriteSeenRight;
- private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+ private ACLScriptedTestProtocol scriptedTestProtocol;
@Before
public void setUp() throws Exception {
- simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
- .withUser(TO_ADDRESS, PASSWORD)
+ system = createImapHostSystem();
+ grantRightsOnHost = createGrantRightsOnHost();
+ MailboxMessageAppender appender = null;
+ scriptedTestProtocol = new ACLScriptedTestProtocol(grantRightsOnHost, appender, "/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
.withLocale(Locale.US);
readWriteSeenRight = new SimpleMailboxACL.Rfc4314Rights("rsw");
}
@Test
public void testACLCommandsOwnerUS() throws Exception {
- simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
+ scriptedTestProtocol.run("ACLCommandsOnOwner");
}
@Test
public void testACLCommandsOtherUserUS() throws Exception {
- simpleScriptedTestProtocol
- .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD);
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
- simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
+ scriptedTestProtocol
+ .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
+ .withGrantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight)
+ .run("ACLCommandsOnOtherUser");
}
@Test
public void testACLCommandsOwnerKorea() throws Exception {
- simpleScriptedTestProtocol.withLocale(Locale.KOREA);
- simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
+ scriptedTestProtocol.withLocale(Locale.KOREA)
+ .run("ACLCommandsOnOwner");
}
@Test
public void testACLCommandsOtherUserKorea() throws Exception {
- simpleScriptedTestProtocol
+ scriptedTestProtocol
.withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
- .withLocale(Locale.KOREA);
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
- simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
+ .withLocale(Locale.KOREA)
+ .withGrantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight)
+ .run("ACLCommandsOnOtherUser");
}
@Test
public void testACLCommandsOwnerItaly() throws Exception {
- simpleScriptedTestProtocol
- .withLocale(Locale.ITALY);
- simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
+ scriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ACLCommandsOnOwner");
}
@Test
public void testACLCommandsOtherUserItaly() throws Exception {
- simpleScriptedTestProtocol
+ scriptedTestProtocol
.withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
- .withLocale(Locale.ITALY);
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
- simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
+ .withLocale(Locale.ITALY)
+ .withGrantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight)
+ .run("ACLCommandsOnOtherUser");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
index c31a5fd..9a64f5f 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
@@ -21,246 +21,278 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.model.SimpleMailboxACL;
import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.MailboxMessageAppender;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.Before;
import org.junit.Test;
-public class ACLIntegration implements ImapTestConstants {
+public abstract class ACLIntegration implements ImapTestConstants {
public static final String OTHER_USER_NAME = "Boby";
public static final String OTHER_USER_PASSWORD = "password";
public static final MailboxPath OTHER_USER_MAILBOX = new MailboxPath("#private", OTHER_USER_NAME, "");
public static final MailboxPath MY_INBOX = new MailboxPath("#private", USER, "");
- @Inject
- private static ImapHostSystem system;
- @Inject
+ protected abstract ImapHostSystem createImapHostSystem();
+ protected abstract GrantRightsOnHost createGrantRightsOnHost();
+ protected abstract MailboxMessageAppender createMailboxMessageAppender();
+
+ private ImapHostSystem system;
private GrantRightsOnHost grantRightsOnHost;
- @Inject
private MailboxMessageAppender mailboxMessageAppender;
- private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+ private ACLScriptedTestProtocol scriptedTestProtocol;
@Before
public void setUp() throws Exception {
- simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
- .withUser(TO_ADDRESS, PASSWORD)
+ system = createImapHostSystem();
+ grantRightsOnHost = createGrantRightsOnHost();
+ mailboxMessageAppender = createMailboxMessageAppender();
+ scriptedTestProtocol = new ACLScriptedTestProtocol(grantRightsOnHost, mailboxMessageAppender, "/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
.withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
.withLocale(Locale.US);
}
@Test
public void rightRShouldBeSufficientToPerformStatusSelectCloseExamineUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("r"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightR");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("r"))
+ .run("aclIntegration/ACLIntegrationRightR");
}
@Test
public void rightRShouldBeNeededToPerformStatusSelectCloseExamineUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("lswipkxtecda"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightR");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("lswipkxtecda"))
+ .run("aclIntegration/ACLIntegrationWithoutRightR");
}
@Test
public void rightLShouldBeSufficientToPerformListUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("l"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightL");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("l"))
+ .run("aclIntegration/ACLIntegrationRightL");
}
@Test
public void rightLShouldBeNeededToPerformListLsubSubscribeUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecda"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightL");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecda"))
+ .run("aclIntegration/ACLIntegrationWithoutRightL");
}
@Test
public void rightAShouldBeSufficientToManageACLUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("a"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightA");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("a"))
+ .run("aclIntegration/ACLIntegrationRightA");
}
@Test
public void rightAShouldBeNeededToManageACLUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecdl"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightA");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecdl"))
+ .run("aclIntegration/ACLIntegrationWithoutRightA");
}
@Test
public void rightXOnOriginShouldBeSufficientToRenameAMailboxUS() throws Exception {
- system.createMailbox(new MailboxPath("#private","Boby","test"));
- grantRightsOnHost.grantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("x"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightX");
+ scriptedTestProtocol
+ .withMailbox(new MailboxPath("#private","Boby","test"))
+ .withGrantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("x"))
+ .run("aclIntegration/ACLIntegrationRightX");
}
@Test
public void rightXOnOriginShouldBeNeededToRenameAMailboxUS() throws Exception {
- system.createMailbox(new MailboxPath("#private","Boby","test"));
- grantRightsOnHost.grantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("rswipktela"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightX");
+ scriptedTestProtocol
+ .withMailbox(new MailboxPath("#private","Boby","test"))
+ .withGrantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("rswipktela"))
+ .run("aclIntegration/ACLIntegrationWithoutRightX");
}
@Test
public void rightKOnDestinationShouldBeSufficientToRenameAMailboxUS() throws Exception {
MailboxPath newMailbox = new MailboxPath("#private", USER, "test");
- system.createMailbox(newMailbox);
- grantRightsOnHost.grantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"));
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("k"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightK");
+ scriptedTestProtocol
+ .withMailbox(newMailbox)
+ .withGrantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"))
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("k"))
+ .run("aclIntegration/ACLIntegrationRightK");
}
@Test
public void rightKOnDestinationShouldBeNeededToRenameAMailboxUS() throws Exception {
MailboxPath newMailbox = new MailboxPath("#private", USER, "test");
- system.createMailbox(newMailbox);
- grantRightsOnHost.grantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"));
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtela"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightK");
+ scriptedTestProtocol
+ .withMailbox(newMailbox)
+ .withGrantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"))
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtela"))
+ .run("aclIntegration/ACLIntegrationWithoutRightK");
}
@Test
public void rightREShouldBeSufficientToPerformExpungeUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("re"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRE");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("re"))
+ .run("aclIntegration/ACLIntegrationRightRE");
}
@Test
public void rightEShouldBeNeededToPerformExpungeUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtclak"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightE");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtclak"))
+ .run("aclIntegration/ACLIntegrationWithoutRightE");
}
@Test
public void rightIShouldBeSufficientToPerformAppendUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ri"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightI");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ri"))
+ .run("aclIntegration/ACLIntegrationRightI");
}
@Test
public void rightIShouldBeNeededToPerformAppendUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswepxtcdlak"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightI");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswepxtcdlak"))
+ .run("aclIntegration/ACLIntegrationWithoutRightI");
}
@Test
public void rightISShouldBeSufficientToPerformAppendOfSeenMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIS");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"))
+ .run("aclIntegration/ACLIntegrationRightIS");
}
@Test
public void rightITShouldBeSufficientToPerformAppendOfDeletedMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIT");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"))
+ .run("aclIntegration/ACLIntegrationRightIT");
}
@Test
public void rightIWShouldBeSufficientToPerformAppendOfDeletedMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"));
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIW");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"))
+ .run("aclIntegration/ACLIntegrationRightIW");
}
@Test
public void rightRSShouldBeSufficientToPerformStoreAndFetchOnSeenMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rs"));
- mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRS");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rs"))
+ .withFilledMailbox(OTHER_USER_MAILBOX)
+ .run("aclIntegration/ACLIntegrationRightRS");
}
@Test
public void rightSShouldBeNeededToPerformStoreAndFetchOnSeenMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxtcdlake"));
- mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightS");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxtcdlake"))
+ .withFilledMailbox(OTHER_USER_MAILBOX)
+ .run("aclIntegration/ACLIntegrationWithoutRightS");
}
@Test
public void rightRWShouldBeSufficientToPerformStoreOnFlaggedMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rw"));
- mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRW");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rw"))
+ .withFilledMailbox(OTHER_USER_MAILBOX)
+ .run("aclIntegration/ACLIntegrationRightRW");
}
@Test
public void rightWShouldBeNeededToPerformStoreOnFlaggedMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rsipxtcdlake"));
- mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightW");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rsipxtcdlake"))
+ .withFilledMailbox(OTHER_USER_MAILBOX)
+ .run("aclIntegration/ACLIntegrationWithoutRightW");
}
@Test
public void rightRTShouldBeSufficientToPerformStoreOnDeletedMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rt"));
- mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRT");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rt"))
+ .withFilledMailbox(OTHER_USER_MAILBOX)
+ .run("aclIntegration/ACLIntegrationRightRT");
}
@Test
public void rightTShouldBeNeededToPerformStoreOnFlaggedMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxslake"));
- mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightT");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxslake"))
+ .withFilledMailbox(OTHER_USER_MAILBOX)
+ .run("aclIntegration/ACLIntegrationWithoutRightT");
}
@Test
public void rightIShouldBeSufficientToPerformCopyUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("i"));
- mailboxMessageAppender.fillMailbox(MY_INBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyI");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("i"))
+ .withFilledMailbox(MY_INBOX)
+ .run("aclIntegration/ACLIntegrationCopyI");
}
@Test
public void rightIShouldBeNeededToPerformCopyUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswpxtcdlake"));
- mailboxMessageAppender.fillMailbox(MY_INBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutI");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswpxtcdlake"))
+ .withFilledMailbox(MY_INBOX)
+ .run("aclIntegration/ACLIntegrationCopyWithoutI");
}
@Test
public void rightIShouldBeSufficientToPerformOfSeenMessagesCopyUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"));
- mailboxMessageAppender.fillMailbox(MY_INBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIS");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"))
+ .withFilledMailbox(MY_INBOX)
+ .run("aclIntegration/ACLIntegrationCopyIS");
}
@Test
public void rightSShouldBeNeededToPerformCopyOfSeenMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riwpxtcdlake"));
- mailboxMessageAppender.fillMailbox(MY_INBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutS");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riwpxtcdlake"))
+ .withFilledMailbox(MY_INBOX)
+ .run("aclIntegration/ACLIntegrationCopyWithoutS");
}
@Test
public void rightIWShouldBeSufficientToPerformOfFlaggedMessagesCopyUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"));
- mailboxMessageAppender.fillMailbox(MY_INBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIW");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"))
+ .withFilledMailbox(MY_INBOX)
+ .run("aclIntegration/ACLIntegrationCopyIW");
}
@Test
public void rightWShouldBeNeededToPerformCopyOfFlaggedMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxtcdlake"));
- mailboxMessageAppender.fillMailbox(MY_INBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutW");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxtcdlake"))
+ .withFilledMailbox(MY_INBOX)
+ .run("aclIntegration/ACLIntegrationCopyWithoutW");
}
@Test
public void rightITShouldBeSufficientToPerformOfDeletedMessagesCopyUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"));
- mailboxMessageAppender.fillMailbox(MY_INBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIT");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"))
+ .withFilledMailbox(MY_INBOX)
+ .run("aclIntegration/ACLIntegrationCopyIT");
}
@Test
public void rightTShouldBeNeededToPerformCopyOfDeletedMessageUS() throws Exception {
- grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxwlake"));
- mailboxMessageAppender.fillMailbox(MY_INBOX);
- simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutT");
+ scriptedTestProtocol
+ .withGrantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxwlake"))
+ .withFilledMailbox(MY_INBOX)
+ .run("aclIntegration/ACLIntegrationCopyWithoutT");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLScriptedTestProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLScriptedTestProtocol.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLScriptedTestProtocol.java
new file mode 100644
index 0000000..0f4bd13
--- /dev/null
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLScriptedTestProtocol.java
@@ -0,0 +1,82 @@
+package org.apache.james.mpt.imapmailbox.suite;
+
+import java.util.Locale;
+
+import org.apache.james.mailbox.model.MailboxACL;
+import org.apache.james.mailbox.model.MailboxACL.MailboxACLRights;
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
+import org.apache.james.mpt.imapmailbox.MailboxMessageAppender;
+import org.apache.james.mpt.script.ImapScriptedTestProtocol;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+
+public class ACLScriptedTestProtocol extends ImapScriptedTestProtocol {
+
+ private static class GrantRightsCommand implements SimpleScriptedTestProtocol.PrepareCommand<HostSystem> {
+ GrantRightsOnHost grantRightsOnHost;
+ MailboxPath mailboxPath;
+ String userName;
+ MailboxACL.MailboxACLRights rights;
+
+ GrantRightsCommand(GrantRightsOnHost grantRightsOnHost, MailboxPath mailboxPath, String userName, MailboxACLRights rights) {
+ this.grantRightsOnHost = grantRightsOnHost;
+ this.mailboxPath = mailboxPath;
+ this.userName = userName;
+ this.rights = rights;
+ }
+
+ @Override
+ public void prepare(HostSystem system) throws Exception {
+ grantRightsOnHost.grantRights(mailboxPath, userName, rights);
+ }
+ }
+
+ private static class FillMailboxCommand implements SimpleScriptedTestProtocol.PrepareCommand<HostSystem> {
+ MailboxMessageAppender mailboxMessageAppender;
+ MailboxPath mailboxPath;
+
+ FillMailboxCommand(MailboxMessageAppender mailboxMessageAppender, MailboxPath mailboxPath) {
+ this.mailboxMessageAppender = mailboxMessageAppender;
+ this.mailboxPath = mailboxPath;
+ }
+
+ @Override
+ public void prepare(HostSystem system) throws Exception {
+ mailboxMessageAppender.fillMailbox(mailboxPath);
+ }
+ }
+
+ private final GrantRightsOnHost grantRightsOnHost;
+ private final MailboxMessageAppender mailboxMessageAppender;
+
+ public ACLScriptedTestProtocol(GrantRightsOnHost grantRightsOnHost, MailboxMessageAppender mailboxMessageAppender, String scriptDirectory, ImapHostSystem hostSystem) throws Exception {
+ super(scriptDirectory, hostSystem);
+ this.grantRightsOnHost = grantRightsOnHost;
+ this.mailboxMessageAppender = mailboxMessageAppender;
+ }
+
+ public ACLScriptedTestProtocol withGrantRights(MailboxPath mailboxPath, String userName, MailboxACL.MailboxACLRights rights) {
+ return (ACLScriptedTestProtocol) withPreparedCommand(new GrantRightsCommand(grantRightsOnHost, mailboxPath, userName, rights));
+ }
+
+ public ACLScriptedTestProtocol withFilledMailbox(MailboxPath otherUserMailbox) {
+ return (ACLScriptedTestProtocol) withPreparedCommand(new FillMailboxCommand(mailboxMessageAppender, otherUserMailbox));
+ }
+
+ @Override
+ public ACLScriptedTestProtocol withUser(String user, String password) {
+ return (ACLScriptedTestProtocol) super.withUser(user, password);
+ }
+
+ @Override
+ public ACLScriptedTestProtocol withLocale(Locale locale) {
+ return (ACLScriptedTestProtocol) super.withLocale(locale);
+ }
+
+ @Override
+ public ACLScriptedTestProtocol withMailbox(MailboxPath mailboxPath) {
+ return (ACLScriptedTestProtocol) super.withMailbox(mailboxPath);
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
index b11eca8..84d068d 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
@@ -21,51 +21,42 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mailbox.model.MailboxConstants;
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
-import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
+import org.apache.james.mpt.script.ImapScriptedTestProtocol;
import org.junit.Before;
import org.junit.Test;
-public class AuthenticatePlain implements ImapTestConstants {
+public abstract class AuthenticatePlain implements ImapTestConstants {
- @Inject
- private static ImapHostSystem system;
-
- private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+ protected abstract ImapHostSystem createImapHostSystem();
+
+ private ImapHostSystem system;
+ private ImapScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ system = createImapHostSystem();
+ simpleScriptedTestProtocol = new ImapScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
- .withLocale(Locale.US);
+ .withUser("delegate", "123456")
+ .withMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"))
+ .withMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
BasicImapCommands.welcome(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testAuthenticatePlainUS() throws Exception {
- system.addUser("delegate", "123456");
- system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
- system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
- simpleScriptedTestProtocol.run("AuthenticatePlain");
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("AuthenticatePlain");
}
@Test
public void testAuthenticatePlainITALY() throws Exception {
- system.addUser("delegate", "123456");
- system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
- system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
simpleScriptedTestProtocol
.withLocale(Locale.ITALY)
.run("AuthenticatePlain");
@@ -73,9 +64,6 @@ public class AuthenticatePlain implements ImapTestConstants {
@Test
public void testAuthenticatePlainKOREA() throws Exception {
- system.addUser("delegate", "123456");
- system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
- system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
simpleScriptedTestProtocol
.withLocale(Locale.KOREA)
.run("AuthenticatePlain");
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
index 45bafa6..3df2651 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
@@ -21,28 +21,25 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mpt.api.ImapFeatures.Feature;
import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
-public class AuthenticatedState extends BasicImapCommands {
+public abstract class AuthenticatedState extends BasicImapCommands {
- @Inject
- private static ImapHostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -50,11 +47,6 @@ public class AuthenticatedState extends BasicImapCommands {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testNoopUS() throws Exception {
simpleScriptedTestProtocol.run("Noop");
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
index 6945e94..bd0d3ae 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
@@ -21,35 +21,28 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class ConcurrentSessions implements ImapTestConstants {
+public abstract class ConcurrentSessions implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD);
BasicImapCommands.welcome(simpleScriptedTestProtocol);
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testConcurrentExpungeResponseUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
index 0336638..8ae9864 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
@@ -21,8 +21,6 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.imap.api.ImapConfiguration;
import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
@@ -31,15 +29,16 @@ import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.Before;
import org.junit.Test;
-public class Condstore implements ImapTestConstants {
-
- @Inject
- private static JamesImapHostSystem system;
+public abstract class Condstore implements ImapTestConstants {
+ protected abstract JamesImapHostSystem createJamesImapHostSystem();
+
+ private JamesImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createJamesImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(TO_ADDRESS, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
index 81f62f9..bc80f53 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
@@ -21,29 +21,29 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.Before;
import org.junit.Test;
-public class Copy implements ImapTestConstants {
+public abstract class Copy implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
BasicImapCommands.welcome(simpleScriptedTestProtocol);
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
@Test
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
index b92ac5f..376a754 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
@@ -21,33 +21,28 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.ImapTestConstants;
-import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.Before;
import org.junit.Test;
-public class DeploymentValidation implements ImapTestConstants {
+public abstract class DeploymentValidation {
public static final String DOMAIN = "domain";
-
- @Inject
- private static HostSystem system;
public static final String USER = "imapuser";
public static final String PASSWORD = "password";
+ protected abstract ImapHostSystem createImapHostSystem();
+
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER + "@" + DOMAIN, PASSWORD)
.withLocale(Locale.US);
- BasicImapCommands.welcome(simpleScriptedTestProtocol);
- BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
@Test
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
index e0470b9..34c03ef 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class Events implements ImapTestConstants {
+public abstract class Events implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -47,11 +45,6 @@ public class Events implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testAppendToSelectedUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
index 87787f6..0750814 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class Expunge implements ImapTestConstants {
+public abstract class Expunge implements ImapTestConstants {
- @Inject
- private static HostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -48,11 +45,6 @@ public class Expunge implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testBasicExpungeUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
index 988fe8e..aa30ba6 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class Fetch implements ImapTestConstants {
+public abstract class Fetch implements ImapTestConstants {
- @Inject
- private static HostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -49,11 +46,6 @@ public class Fetch implements ImapTestConstants {
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testFetchEnvelopeUS() throws Exception {
simpleScriptedTestProtocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
index 1e5a355..e96f98a 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class FetchBodySection implements ImapTestConstants {
+public abstract class FetchBodySection implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -47,11 +45,6 @@ public class FetchBodySection implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testFetchMultipartAlternativeUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
index 19596a6..8ff3280 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class FetchBodyStructure implements ImapTestConstants {
+public abstract class FetchBodyStructure implements ImapTestConstants {
- @Inject
- private static HostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -48,11 +45,6 @@ public class FetchBodyStructure implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testFetchFetchSimpleBodyStructureUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
index c434359..fb34e02 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class FetchHeaders implements ImapTestConstants {
+public abstract class FetchHeaders implements ImapTestConstants {
- @Inject
- private static HostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -48,11 +45,6 @@ public class FetchHeaders implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testFetchHeaderFieldsUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
index 847974b..568c830 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
@@ -21,35 +21,28 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class Listing implements ImapTestConstants {
+public abstract class Listing implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD);
BasicImapCommands.welcome(simpleScriptedTestProtocol);
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testListPlusUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
index 3798cbe..0cde7ec 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
@@ -22,27 +22,25 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mpt.api.ImapFeatures;
import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
-public class MailboxAnnotation implements ImapTestConstants {
+public abstract class MailboxAnnotation implements ImapTestConstants {
- @Inject
- private static ImapHostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
Assume.assumeTrue(system.supports(ImapFeatures.Feature.ANNOTATION_SUPPORT));
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
@@ -52,11 +50,6 @@ public class MailboxAnnotation implements ImapTestConstants {
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testAnnotationUS() throws Exception {
simpleScriptedTestProtocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
index b0fda10..4d0d154 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
@@ -21,24 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class MailboxWithLongNameError implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+public abstract class MailboxWithLongNameError implements ImapTestConstants {
+
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -46,11 +45,6 @@ public class MailboxWithLongNameError implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testWithLongMailboxNameUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
index ad040d0..92c4e53 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
@@ -21,24 +21,25 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
-public class MailboxWithLongNameSuccess implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+@Ignore("why ?")
+public abstract class MailboxWithLongNameSuccess implements ImapTestConstants {
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
index 7d1208c..613ef90 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
@@ -21,28 +21,25 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mpt.api.ImapFeatures;
import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
-public class Move implements ImapTestConstants {
-
- @Inject
- private static ImapHostSystem system;
+public abstract class Move implements ImapTestConstants {
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -51,11 +48,6 @@ public class Move implements ImapTestConstants {
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void moveShouldWork() throws Exception {
Assume.assumeTrue(system.supports(ImapFeatures.Feature.MOVE_SUPPORT));
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
index 306c448..4b2b8f6 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
@@ -21,36 +21,29 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class NonAuthenticatedState implements ImapTestConstants {
+public abstract class NonAuthenticatedState implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
BasicImapCommands.welcome(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testNoopUS() throws Exception {
simpleScriptedTestProtocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
index 02b0456..361aa76 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class PartialFetch implements ImapTestConstants {
+public abstract class PartialFetch implements ImapTestConstants {
- @Inject
- private static HostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -49,11 +46,6 @@ public class PartialFetch implements ImapTestConstants {
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testBodyPartialFetchUS() throws Exception {
simpleScriptedTestProtocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
index 34b35c2..cec3719 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
@@ -21,8 +21,6 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mpt.api.ImapFeatures;
import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
@@ -33,19 +31,19 @@ import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
-public class QuotaTest implements ImapTestConstants {
+public abstract class QuotaTest implements ImapTestConstants {
private static final int MAX_MESSAGE_QUOTA = 4096;
private static final long MAX_STORAGE_QUOTA = 5 * 1024L * 1024L * 1024L;
- @Inject
- private static ImapHostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
Assume.assumeTrue(system.supports(ImapFeatures.Feature.QUOTA_SUPPORT));
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
index 517c3e9..c77b2ad 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class Rename implements ImapTestConstants {
+public abstract class Rename implements ImapTestConstants {
- @Inject
- private static HostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -49,11 +46,6 @@ public class Rename implements ImapTestConstants {
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testRenameUS() throws Exception {
simpleScriptedTestProtocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
index 22cb785..f613d49 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class Search implements ImapTestConstants {
+public abstract class Search implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -47,11 +45,6 @@ public class Search implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testSearchAtomsUS() throws Exception {
simpleScriptedTestProtocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
index 0628c11..29ec0ac 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
@@ -21,35 +21,25 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
-import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class Security implements ImapTestConstants {
+public abstract class Security implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
- BasicImapCommands.welcome(simpleScriptedTestProtocol);
- BasicImapCommands.authenticate(simpleScriptedTestProtocol);
- }
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
}
@Test
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
index 411ef76..af6f85a 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class Select implements ImapTestConstants {
+public abstract class Select implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -47,11 +45,6 @@ public class Select implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testSelectUnseenUS() throws Exception {
simpleScriptedTestProtocol
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[06/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
new file mode 100644
index 0000000..9ac3301
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneConcurrentSessions.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneConcurrentSessions extends ConcurrentSessions {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
new file mode 100644
index 0000000..ad90cf4
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
@@ -0,0 +1,35 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class LuceneCondstore extends Condstore {
+
+ private JamesImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(JamesImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected JamesImapHostSystem createJamesImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
new file mode 100644
index 0000000..8f10a2e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCopy.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneCopy extends Copy {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
new file mode 100644
index 0000000..cb4150e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneEvents.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneEvents extends Events {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
new file mode 100644
index 0000000..53f5d84
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneExpunge.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneExpunge extends Expunge {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
new file mode 100644
index 0000000..1371555
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetch.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneFetch extends Fetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
new file mode 100644
index 0000000..9586144
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodySection.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneFetchBodySection extends FetchBodySection {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
new file mode 100644
index 0000000..34967ab
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchBodyStructure.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneFetchBodyStructure extends FetchBodyStructure {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
new file mode 100644
index 0000000..f346259
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneFetchHeaders.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneFetchHeaders extends FetchHeaders {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
new file mode 100644
index 0000000..1bc9698
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneListing.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneListing extends Listing {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
new file mode 100644
index 0000000..999e14d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxAnnotation.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneMailboxAnnotation extends MailboxAnnotation {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
new file mode 100644
index 0000000..3e92189
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameError.java
@@ -0,0 +1,35 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class LuceneMailboxWithLongNameError extends MailboxWithLongNameError {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..355b0a6
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMailboxWithLongNameSuccess.java
@@ -0,0 +1,35 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why")
+public class LuceneMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
new file mode 100644
index 0000000..370f3f8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneMove.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Move;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneMove extends Move {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
new file mode 100644
index 0000000..1df51bc
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneNonAuthenticatedState.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneNonAuthenticatedState extends NonAuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
new file mode 100644
index 0000000..a7e0b98
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LucenePartialFetch.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LucenePartialFetch extends PartialFetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
new file mode 100644
index 0000000..4c6ad1c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneQuotaTest.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneQuotaTest extends QuotaTest {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
new file mode 100644
index 0000000..ca12fff
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneRename.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Rename;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneRename extends Rename {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
new file mode 100644
index 0000000..6bab50b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearch.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Search;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneSearch extends Search {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTest.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTest.java
deleted file mode 100644
index 193849e..0000000
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************
- * 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.lucenesearch;
-
-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.MailboxAnnotation;
-import org.apache.james.mpt.imapmailbox.suite.Move;
-import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
-import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
-import org.apache.james.mpt.imapmailbox.suite.Rename;
-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.UidSearchOnIndex;
-import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.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,
- Security.class,
- Select.class,
- QuotaTest.class,
- UserFlagsSupport.class,
- Move.class,
- SelectedInbox.class,
- SelectedState.class,
- MailboxAnnotation.class,
- UidSearchOnIndex.class
-})
-@GuiceModules({LuceneSearchMailboxTestModule.class})
-public class LuceneSearchMailboxTest {
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java
new file mode 100644
index 0000000..e8468fe
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSecurity.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Security;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneSecurity extends Security {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java
new file mode 100644
index 0000000..4652549
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelect.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Select;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneSelect extends Select {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java
new file mode 100644
index 0000000..5d02459
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedInbox.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneSelectedInbox extends SelectedInbox {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java
new file mode 100644
index 0000000..008823d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSelectedState.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneSelectedState extends SelectedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java
new file mode 100644
index 0000000..2e950fb
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearch.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneUidSearch extends UidSearch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java
new file mode 100644
index 0000000..47802c7
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUidSearchOnIndex.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneUidSearchOnIndex extends UidSearchOnIndex {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java
new file mode 100644
index 0000000..3c6452b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneUserFlagsSupport.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.lucenesearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class LuceneUserFlagsSupport extends UserFlagsSupport {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new LuceneSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java
new file mode 100644
index 0000000..a9ac719
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatePlain.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirAuthenticatePlain extends AuthenticatePlain {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java
new file mode 100644
index 0000000..ee27107
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirAuthenticatedState extends AuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java
new file mode 100644
index 0000000..e50a9a9
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirConcurrentSessions.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirConcurrentSessions extends ConcurrentSessions {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
new file mode 100644
index 0000000..ff7b6e0
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class MaildirCondstore extends Condstore {
+
+ private JamesImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(JamesImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected JamesImapHostSystem createJamesImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java
new file mode 100644
index 0000000..8dd20de
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCopy.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirCopy extends Copy {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java
new file mode 100644
index 0000000..e497f42
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirEvents.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirEvents extends Events {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java
new file mode 100644
index 0000000..ce703fc
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirExpunge.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirExpunge extends Expunge {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java
new file mode 100644
index 0000000..2983b97
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirFetch extends Fetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java
new file mode 100644
index 0000000..d3dee44
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodySection.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirFetchBodySection extends FetchBodySection {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java
new file mode 100644
index 0000000..525395c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchBodyStructure.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirFetchBodyStructure extends FetchBodyStructure {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java
new file mode 100644
index 0000000..dd39f1b
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirFetchHeaders.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirFetchHeaders extends FetchHeaders {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java
new file mode 100644
index 0000000..a67db7d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirListing.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirListing extends Listing {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java
new file mode 100644
index 0000000..f3413bc
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirMailboxAnnotation extends MailboxAnnotation {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTest.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTest.java
deleted file mode 100644
index 88edfc3..0000000
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTest.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/****************************************************************
- * 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.maildir;
-
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-
-@GuiceModules({ MaildirMailboxTestModule.class })
-public class MaildirMailboxTest extends AbstractMailboxTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
new file mode 100644
index 0000000..e67b8cc
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameError.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why ?")
+public class MaildirMailboxWithLongNameError extends MailboxWithLongNameError {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..35b1176
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxWithLongNameSuccess.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why")
+public class MaildirMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java
new file mode 100644
index 0000000..e6186a5
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMove.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Move;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirMove extends Move {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java
new file mode 100644
index 0000000..7fb5f66
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirNonAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirNonAuthenticatedState extends NonAuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java
new file mode 100644
index 0000000..87e0c97
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirPartialFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirPartialFetch extends PartialFetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java
new file mode 100644
index 0000000..31c5268
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirQuotaTest.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirQuotaTest extends QuotaTest {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java
new file mode 100644
index 0000000..82bb14e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirRename.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Rename;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirRename extends Rename {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java
new file mode 100644
index 0000000..fb12cfb
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Search;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirSearch extends Search {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java
new file mode 100644
index 0000000..600ddf2
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSecurity.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Security;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirSecurity extends Security {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java
new file mode 100644
index 0000000..7539aa6
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelect.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Select;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirSelect extends Select {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
new file mode 100644
index 0000000..051379a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedInbox.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirSelectedInbox extends SelectedInbox {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
new file mode 100644
index 0000000..1a0c9b9
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirSelectedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirSelectedState extends SelectedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
new file mode 100644
index 0000000..19e9ed5
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirUidSearch extends UidSearch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java
new file mode 100644
index 0000000..4e56d03
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUidSearchOnIndex.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirUidSearchOnIndex extends UidSearchOnIndex {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java
new file mode 100644
index 0000000..3ca7d4d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirUserFlagsSupport.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.maildir;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class MaildirUserFlagsSupport extends UserFlagsSupport {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[10/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
MPT-39 finally remove this crazy static injection with onami
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/78cf06ab
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/78cf06ab
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/78cf06ab
Branch: refs/heads/master
Commit: 78cf06abf4c44851c116f71e27326773356c14b7
Parents: 986df60
Author: Matthieu Baechler <ma...@apache.org>
Authored: Thu Jun 22 16:59:45 2017 +0200
Committer: Matthieu Baechler <ma...@apache.org>
Committed: Thu Jul 6 10:32:17 2017 -0400
----------------------------------------------------------------------
.../GenericSimpleScriptedTestProtocol.java | 206 +++++++++
.../mpt/script/ImapScriptedTestProtocol.java | 30 ++
.../mpt/script/SimpleScriptedTestProtocol.java | 176 +-------
.../cassandra/CassandraAuthenticatePlain.java | 32 ++
.../cassandra/CassandraAuthenticatedState.java | 32 ++
.../cassandra/CassandraConcurrentSessions.java | 32 ++
.../cassandra/CassandraCondstore.java | 34 ++
.../imapmailbox/cassandra/CassandraCopy.java | 32 ++
.../imapmailbox/cassandra/CassandraEvents.java | 32 ++
.../imapmailbox/cassandra/CassandraExpunge.java | 32 ++
.../imapmailbox/cassandra/CassandraFetch.java | 32 ++
.../cassandra/CassandraFetchBodySection.java | 32 ++
.../cassandra/CassandraFetchBodyStructure.java | 32 ++
.../cassandra/CassandraFetchHeaders.java | 32 ++
.../imapmailbox/cassandra/CassandraListing.java | 32 ++
.../cassandra/CassandraMailboxAnnotation.java | 32 ++
.../cassandra/CassandraMailboxTest.java | 79 ----
.../CassandraMailboxWithLongNameError.java | 32 ++
.../CassandraMailboxWithLongNameSuccess.java | 34 ++
.../imapmailbox/cassandra/CassandraMove.java | 32 ++
.../CassandraNonAuthenticatedState.java | 32 ++
.../cassandra/CassandraPartialFetch.java | 32 ++
.../cassandra/CassandraQuotaTest.java | 32 ++
.../imapmailbox/cassandra/CassandraRename.java | 32 ++
.../imapmailbox/cassandra/CassandraSearch.java | 32 ++
.../cassandra/CassandraSecurity.java | 32 ++
.../imapmailbox/cassandra/CassandraSelect.java | 32 ++
.../cassandra/CassandraSelectedInbox.java | 32 ++
.../cassandra/CassandraSelectedState.java | 32 ++
.../cassandra/CassandraUidSearch.java | 32 ++
.../cassandra/CassandraUidSearchOnIndex.java | 32 ++
.../cassandra/CassandraUserFlagsSupport.java | 32 ++
.../cassandra/host/CassandraHostSystem.java | 16 +-
mpt/impl/imap-mailbox/core/pom.xml | 4 -
.../mpt/imapmailbox/AbstractMailboxTest.java | 76 ----
.../mpt/imapmailbox/suite/ACLCommands.java | 60 +--
.../mpt/imapmailbox/suite/ACLIntegration.java | 218 +++++----
.../suite/ACLScriptedTestProtocol.java | 82 ++++
.../imapmailbox/suite/AuthenticatePlain.java | 40 +-
.../imapmailbox/suite/AuthenticatedState.java | 16 +-
.../imapmailbox/suite/ConcurrentSessions.java | 17 +-
.../james/mpt/imapmailbox/suite/Condstore.java | 11 +-
.../james/mpt/imapmailbox/suite/Copy.java | 12 +-
.../imapmailbox/suite/DeploymentValidation.java | 17 +-
.../james/mpt/imapmailbox/suite/Events.java | 17 +-
.../james/mpt/imapmailbox/suite/Expunge.java | 18 +-
.../james/mpt/imapmailbox/suite/Fetch.java | 18 +-
.../mpt/imapmailbox/suite/FetchBodySection.java | 17 +-
.../imapmailbox/suite/FetchBodyStructure.java | 18 +-
.../mpt/imapmailbox/suite/FetchHeaders.java | 18 +-
.../james/mpt/imapmailbox/suite/Listing.java | 17 +-
.../imapmailbox/suite/MailboxAnnotation.java | 15 +-
.../suite/MailboxWithLongNameError.java | 18 +-
.../suite/MailboxWithLongNameSuccess.java | 13 +-
.../james/mpt/imapmailbox/suite/Move.java | 16 +-
.../suite/NonAuthenticatedState.java | 17 +-
.../mpt/imapmailbox/suite/PartialFetch.java | 18 +-
.../james/mpt/imapmailbox/suite/QuotaTest.java | 10 +-
.../james/mpt/imapmailbox/suite/Rename.java | 18 +-
.../james/mpt/imapmailbox/suite/Search.java | 17 +-
.../james/mpt/imapmailbox/suite/Security.java | 20 +-
.../james/mpt/imapmailbox/suite/Select.java | 17 +-
.../mpt/imapmailbox/suite/SelectedInbox.java | 17 +-
.../mpt/imapmailbox/suite/SelectedState.java | 18 +-
.../james/mpt/imapmailbox/suite/UidSearch.java | 17 +-
.../mpt/imapmailbox/suite/UidSearchOnIndex.java | 13 +-
.../mpt/imapmailbox/suite/UserFlagsSupport.java | 15 +-
.../suite/base/BasicImapCommands.java | 5 +-
.../mpt/imapmailbox/cyrus/CyrusACLCommands.java | 41 ++
.../imapmailbox/cyrus/CyrusACLIntegration.java | 49 ++
.../mpt/imapmailbox/cyrus/CyrusMailboxTest.java | 54 ---
.../elasticsearch/ElasticSearchMailboxTest.java | 34 --
.../ElasticSearchUidSearchOnIndex.java | 33 ++
.../external/james/ExternalJamesTest.java | 36 --
.../james/JamesDeploymentValidation.java | 34 ++
.../hbase/HBaseAuthenticatePlain.java | 32 ++
.../hbase/HBaseAuthenticatedState.java | 32 ++
.../hbase/HBaseConcurrentSessions.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseCondstore.java | 34 ++
.../james/mpt/imapmailbox/hbase/HBaseCopy.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseEvents.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseExpunge.java | 32 ++
.../james/mpt/imapmailbox/hbase/HBaseFetch.java | 32 ++
.../hbase/HBaseFetchBodySection.java | 32 ++
.../hbase/HBaseFetchBodyStructure.java | 32 ++
.../imapmailbox/hbase/HBaseFetchHeaders.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseListing.java | 32 ++
.../hbase/HBaseMailboxAnnotation.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseMailboxTest.java | 9 -
.../hbase/HBaseMailboxWithLongNameError.java | 32 ++
.../hbase/HBaseMailboxWithLongNameSuccess.java | 34 ++
.../james/mpt/imapmailbox/hbase/HBaseMove.java | 32 ++
.../hbase/HBaseNonAuthenticatedState.java | 32 ++
.../imapmailbox/hbase/HBasePartialFetch.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseQuotaTest.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseRename.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseSearch.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseSecurity.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseSelect.java | 32 ++
.../imapmailbox/hbase/HBaseSelectedInbox.java | 32 ++
.../imapmailbox/hbase/HBaseSelectedState.java | 32 ++
.../mpt/imapmailbox/hbase/HBaseUidSearch.java | 32 ++
.../hbase/HBaseUidSearchOnIndex.java | 32 ++
.../hbase/HBaseUserFlagsSupport.java | 32 ++
.../inmemory/InMemoryAuthenticatePlain.java | 32 ++
.../inmemory/InMemoryAuthenticatedState.java | 32 ++
.../inmemory/InMemoryConcurrentSessions.java | 32 ++
.../imapmailbox/inmemory/InMemoryCondstore.java | 34 ++
.../mpt/imapmailbox/inmemory/InMemoryCopy.java | 32 ++
.../imapmailbox/inmemory/InMemoryEvents.java | 32 ++
.../imapmailbox/inmemory/InMemoryExpunge.java | 32 ++
.../mpt/imapmailbox/inmemory/InMemoryFetch.java | 32 ++
.../inmemory/InMemoryFetchBodySection.java | 32 ++
.../inmemory/InMemoryFetchBodyStructure.java | 32 ++
.../inmemory/InMemoryFetchHeaders.java | 32 ++
.../imapmailbox/inmemory/InMemoryListing.java | 32 ++
.../inmemory/InMemoryMailboxAnnotation.java | 32 ++
.../InMemoryMailboxEventAsynchronousTest.java | 70 ---
...emoryMailboxEventAsynchronousTestModule.java | 42 --
.../inmemory/InMemoryMailboxTest.java | 80 ----
.../InMemoryMailboxWithLongNameError.java | 34 ++
.../InMemoryMailboxWithLongNameSuccess.java | 32 ++
.../mpt/imapmailbox/inmemory/InMemoryMove.java | 32 ++
.../inmemory/InMemoryNonAuthenticatedState.java | 32 ++
.../inmemory/InMemoryPartialFetch.java | 32 ++
.../imapmailbox/inmemory/InMemoryQuotaTest.java | 32 ++
.../imapmailbox/inmemory/InMemoryRename.java | 32 ++
.../imapmailbox/inmemory/InMemorySearch.java | 32 ++
.../imapmailbox/inmemory/InMemorySecurity.java | 32 ++
.../imapmailbox/inmemory/InMemorySelect.java | 32 ++
.../inmemory/InMemorySelectedInbox.java | 32 ++
.../inmemory/InMemorySelectedState.java | 32 ++
.../imapmailbox/inmemory/InMemoryUidSearch.java | 32 ++
.../inmemory/InMemoryUidSearchOnIndex.java | 32 ++
.../inmemory/InMemoryUserFlagsSupport.java | 32 ++
.../InMemoryEventAsynchronousHostSystem.java | 132 ------
.../mpt/imapmailbox/jcr/JcrMailboxTest.java | 5 +-
.../imapmailbox/jpa/JpaAuthenticatePlain.java | 32 ++
.../imapmailbox/jpa/JpaAuthenticatedState.java | 32 ++
.../imapmailbox/jpa/JpaConcurrentSessions.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaCondstore.java | 34 ++
.../james/mpt/imapmailbox/jpa/JpaCopy.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaEvents.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaExpunge.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaFetch.java | 32 ++
.../imapmailbox/jpa/JpaFetchBodySection.java | 32 ++
.../imapmailbox/jpa/JpaFetchBodyStructure.java | 32 ++
.../mpt/imapmailbox/jpa/JpaFetchHeaders.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaListing.java | 32 ++
.../imapmailbox/jpa/JpaMailboxAnnotation.java | 32 ++
.../mpt/imapmailbox/jpa/JpaMailboxTest.java | 27 --
.../jpa/JpaMailboxWithLongNameError.java | 34 ++
.../jpa/JpaMailboxWithLongNameSuccess.java | 34 ++
.../james/mpt/imapmailbox/jpa/JpaMove.java | 32 ++
.../jpa/JpaNonAuthenticatedState.java | 32 ++
.../mpt/imapmailbox/jpa/JpaPartialFetch.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaQuotaTest.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaRename.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaSearch.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaSecurity.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaSelect.java | 32 ++
.../mpt/imapmailbox/jpa/JpaSelectedInbox.java | 32 ++
.../mpt/imapmailbox/jpa/JpaSelectedState.java | 32 ++
.../james/mpt/imapmailbox/jpa/JpaUidSearch.java | 32 ++
.../imapmailbox/jpa/JpaUidSearchOnIndex.java | 32 ++
.../imapmailbox/jpa/JpaUserFlagsSupport.java | 32 ++
.../lucenesearch/LuceneAuthenticatePlain.java | 33 ++
.../lucenesearch/LuceneAuthenticatedState.java | 33 ++
.../lucenesearch/LuceneConcurrentSessions.java | 33 ++
.../lucenesearch/LuceneCondstore.java | 35 ++
.../imapmailbox/lucenesearch/LuceneCopy.java | 33 ++
.../imapmailbox/lucenesearch/LuceneEvents.java | 33 ++
.../imapmailbox/lucenesearch/LuceneExpunge.java | 33 ++
.../imapmailbox/lucenesearch/LuceneFetch.java | 33 ++
.../lucenesearch/LuceneFetchBodySection.java | 33 ++
.../lucenesearch/LuceneFetchBodyStructure.java | 33 ++
.../lucenesearch/LuceneFetchHeaders.java | 33 ++
.../imapmailbox/lucenesearch/LuceneListing.java | 33 ++
.../lucenesearch/LuceneMailboxAnnotation.java | 33 ++
.../LuceneMailboxWithLongNameError.java | 35 ++
.../LuceneMailboxWithLongNameSuccess.java | 35 ++
.../imapmailbox/lucenesearch/LuceneMove.java | 33 ++
.../LuceneNonAuthenticatedState.java | 33 ++
.../lucenesearch/LucenePartialFetch.java | 33 ++
.../lucenesearch/LuceneQuotaTest.java | 33 ++
.../imapmailbox/lucenesearch/LuceneRename.java | 33 ++
.../imapmailbox/lucenesearch/LuceneSearch.java | 33 ++
.../lucenesearch/LuceneSearchMailboxTest.java | 74 ---
.../lucenesearch/LuceneSecurity.java | 33 ++
.../imapmailbox/lucenesearch/LuceneSelect.java | 33 ++
.../lucenesearch/LuceneSelectedInbox.java | 33 ++
.../lucenesearch/LuceneSelectedState.java | 33 ++
.../lucenesearch/LuceneUidSearch.java | 33 ++
.../lucenesearch/LuceneUidSearchOnIndex.java | 33 ++
.../lucenesearch/LuceneUserFlagsSupport.java | 33 ++
.../maildir/MaildirAuthenticatePlain.java | 32 ++
.../maildir/MaildirAuthenticatedState.java | 32 ++
.../maildir/MaildirConcurrentSessions.java | 32 ++
.../imapmailbox/maildir/MaildirCondstore.java | 34 ++
.../mpt/imapmailbox/maildir/MaildirCopy.java | 32 ++
.../mpt/imapmailbox/maildir/MaildirEvents.java | 32 ++
.../mpt/imapmailbox/maildir/MaildirExpunge.java | 32 ++
.../mpt/imapmailbox/maildir/MaildirFetch.java | 32 ++
.../maildir/MaildirFetchBodySection.java | 32 ++
.../maildir/MaildirFetchBodyStructure.java | 32 ++
.../maildir/MaildirFetchHeaders.java | 32 ++
.../mpt/imapmailbox/maildir/MaildirListing.java | 32 ++
.../maildir/MaildirMailboxAnnotation.java | 32 ++
.../imapmailbox/maildir/MaildirMailboxTest.java | 27 --
.../MaildirMailboxWithLongNameError.java | 34 ++
.../MaildirMailboxWithLongNameSuccess.java | 34 ++
.../mpt/imapmailbox/maildir/MaildirMove.java | 32 ++
.../maildir/MaildirNonAuthenticatedState.java | 32 ++
.../maildir/MaildirPartialFetch.java | 32 ++
.../imapmailbox/maildir/MaildirQuotaTest.java | 32 ++
.../mpt/imapmailbox/maildir/MaildirRename.java | 32 ++
.../mpt/imapmailbox/maildir/MaildirSearch.java | 32 ++
.../imapmailbox/maildir/MaildirSecurity.java | 32 ++
.../mpt/imapmailbox/maildir/MaildirSelect.java | 32 ++
.../maildir/MaildirSelectedInbox.java | 32 ++
.../maildir/MaildirSelectedState.java | 32 ++
.../imapmailbox/maildir/MaildirUidSearch.java | 32 ++
.../maildir/MaildirUidSearchOnIndex.java | 32 ++
.../maildir/MaildirUserFlagsSupport.java | 33 ++
.../cassandra/CassandraAuthenticateTest.java | 51 +++
.../cassandra/CassandraCapabilityTest.java | 51 +++
.../cassandra/CassandraCheckScriptTest.java | 51 +++
.../cassandra/CassandraDeleteScriptTest.java | 51 +++
.../cassandra/CassandraGetScriptTest.java | 51 +++
.../cassandra/CassandraHaveSpaceTest.java | 51 +++
.../cassandra/CassandraListScriptsTest.java | 51 +++
.../cassandra/CassandraLogoutTest.java | 50 ++
.../cassandra/CassandraNoopTest.java | 51 +++
.../cassandra/CassandraPutScriptTest.java | 51 +++
.../cassandra/CassandraRenameScriptTest.java | 51 +++
.../cassandra/CassandraSetActiveTest.java | 51 +++
.../cassandra/CassandraStartTlsTest.java | 51 +++
.../cassandra/CassandraUnauthenticatedTest.java | 51 +++
.../cassandra/ManageSieveCassandraTest.java | 60 ---
mpt/impl/managesieve/core/pom.xml | 6 +-
.../james/mpt/testsuite/AuthenticateTest.java | 12 +-
.../james/mpt/testsuite/CapabilityTest.java | 12 +-
.../james/mpt/testsuite/CheckScriptTest.java | 15 +-
.../james/mpt/testsuite/DeleteScriptTest.java | 12 +-
.../james/mpt/testsuite/GetScriptTest.java | 12 +-
.../james/mpt/testsuite/HaveSpaceTest.java | 23 +-
.../james/mpt/testsuite/ListScriptsTest.java | 12 +-
.../apache/james/mpt/testsuite/LogoutTest.java | 12 +-
.../apache/james/mpt/testsuite/NoopTest.java | 12 +-
.../james/mpt/testsuite/PutScriptTest.java | 13 +-
.../james/mpt/testsuite/RenameScriptTest.java | 12 +-
.../james/mpt/testsuite/SetActiveTest.java | 12 +-
.../james/mpt/testsuite/StartTlsTest.java | 12 +-
.../mpt/testsuite/UnauthenticatedTest.java | 12 +-
.../managesieve/file/FileAuthenticateTest.java | 51 +++
.../managesieve/file/FileCapabilityTest.java | 51 +++
.../managesieve/file/FileCheckScriptTest.java | 51 +++
.../managesieve/file/FileDeleteScriptTest.java | 51 +++
.../mpt/managesieve/file/FileGetScriptTest.java | 51 +++
.../mpt/managesieve/file/FileHaveSpaceTest.java | 51 +++
.../managesieve/file/FileListScriptsTest.java | 51 +++
.../mpt/managesieve/file/FileLogoutTest.java | 50 ++
.../mpt/managesieve/file/FileNoopTest.java | 51 +++
.../mpt/managesieve/file/FilePutScriptTest.java | 51 +++
.../managesieve/file/FileRenameScriptTest.java | 51 +++
.../mpt/managesieve/file/FileSetActiveTest.java | 51 +++
.../mpt/managesieve/file/FileStartTlsTest.java | 51 +++
.../file/FileUnauthenticatedTest.java | 51 +++
.../managesieve/file/ManageSieveFileTest.java | 60 ---
mpt/impl/smtp/cassandra/pom.xml | 4 -
.../mpt/smtp/CassandraForwardSmtpTest.java | 49 ++
.../smtp/CassandraSmtpStarttlsCommandTest.java | 49 ++
.../org/apache/james/mpt/smtp/SmtpTest.java | 33 --
.../apache/james/mpt/smtp/SmtpTestModule.java | 19 +-
.../apache/james/mpt/smtp/StarttlsSmtpTest.java | 33 --
.../james/mpt/smtp/StarttlsSmtpTestModule.java | 32 --
.../apache/james/mpt/smtp/ForwardSmtpTest.java | 21 +-
.../james/mpt/smtp/SmtpStarttlsCommandTest.java | 13 +-
mpt/onami-test/pom.xml | 80 ----
.../james/mpt/onami/test/GuiceMockModule.java | 157 -------
.../james/mpt/onami/test/MockEngineFactory.java | 62 ---
.../james/mpt/onami/test/OnamiRunner.java | 451 -------------------
.../apache/james/mpt/onami/test/OnamiSuite.java | 409 -----------------
.../mpt/onami/test/annotation/GuiceModules.java | 41 --
.../test/annotation/GuiceProvidedModules.java | 43 --
.../james/mpt/onami/test/annotation/Mock.java | 75 ---
.../onami/test/annotation/MockFramework.java | 39 --
.../mpt/onami/test/annotation/MockObjType.java | 47 --
.../mpt/onami/test/annotation/MockType.java | 38 --
.../onami/test/guice/MockMembersInjector.java | 70 ---
.../mpt/onami/test/guice/MockTypeListener.java | 78 ----
.../handler/GuiceInjectableClassHandler.java | 77 ----
.../onami/test/handler/GuiceModuleHandler.java | 68 ---
.../handler/GuiceProvidedModuleHandler.java | 115 -----
.../test/handler/MockFrameworkHandler.java | 66 ---
.../mpt/onami/test/handler/MockHandler.java | 151 -------
.../james/mpt/onami/test/mock/MockEngine.java | 49 --
.../test/mock/framework/EasyMockFramework.java | 60 ---
.../test/mock/framework/MockitoFramework.java | 52 ---
.../test/reflection/AnnotationHandler.java | 44 --
.../mpt/onami/test/reflection/ClassHandler.java | 31 --
.../mpt/onami/test/reflection/ClassVisitor.java | 101 -----
.../mpt/onami/test/reflection/FieldHandler.java | 32 --
.../onami/test/reflection/HandleException.java | 61 ---
.../onami/test/reflection/MethodHandler.java | 32 --
.../mpt/onami/test/AbstractEmptyTestCase.java | 40 --
.../mpt/onami/test/AbstractMockTestCase.java | 37 --
.../mpt/onami/test/AbstractMockitoTestCase.java | 42 --
.../james/mpt/onami/test/AbstractTestCase.java | 72 ---
.../test/InjectDependingMockObjectTestCase.java | 82 ----
.../test/InjectFromSuperClassTestCase.java | 55 ---
.../test/InjectJSR330ModuleClassTestCase.java | 50 --
.../onami/test/InjectMockObjectTestCase.java | 92 ----
.../onami/test/InjectModuleClassTestCase.java | 50 --
.../onami/test/InjectStaticSimpleTestCase.java | 67 ---
.../james/mpt/onami/test/MockTypeTestCase.java | 41 --
.../onami/test/MockitoFrameworkTestCase.java | 56 ---
.../james/mpt/onami/test/OnamiSuiteTest.java | 29 --
.../mpt/onami/test/ServiceMockProviderTest.java | 41 --
.../apache/james/mpt/onami/test/SimpleTest.java | 53 ---
.../mpt/onami/test/data/ComplexModule.java | 37 --
.../mpt/onami/test/data/HelloWordAnnotated.java | 44 --
.../james/mpt/onami/test/data/HelloWorld.java | 59 ---
.../james/mpt/onami/test/data/Service.java | 28 --
.../james/mpt/onami/test/data/ServiceImpl.java | 32 --
.../onami/test/data/ServiceMockProvider.java | 31 --
.../mpt/onami/test/data/ServiceModule.java | 32 --
.../james/mpt/onami/test/data/SimpleModule.java | 31 --
.../mpt/onami/test/data/TelephonService.java | 26 --
.../onami/test/data/TelephonServiceImpl.java | 29 --
.../mpt/onami/test/data/TestAnnotation.java | 31 --
.../mpt/onami/test/data/TestAnnotation2.java | 31 --
.../apache/james/mpt/onami/test/data/WhoIm.java | 34 --
.../test/guice/MockAnnotatedWithTestCase.java | 73 ---
.../test/guice/TestCustomInjectionTest.java | 78 ----
.../src/test/resources/log4j.properties | 46 --
mpt/pom.xml | 6 -
337 files changed, 7895 insertions(+), 5706 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/core/src/main/java/org/apache/james/mpt/script/GenericSimpleScriptedTestProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/script/GenericSimpleScriptedTestProtocol.java b/mpt/core/src/main/java/org/apache/james/mpt/script/GenericSimpleScriptedTestProtocol.java
new file mode 100644
index 0000000..8f0bc0f
--- /dev/null
+++ b/mpt/core/src/main/java/org/apache/james/mpt/script/GenericSimpleScriptedTestProtocol.java
@@ -0,0 +1,206 @@
+/****************************************************************
+ * 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.script;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.james.mpt.api.Continuation;
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.Session;
+import org.apache.james.mpt.protocol.FileProtocolSessionBuilder;
+import org.apache.james.mpt.protocol.ProtocolSession;
+
+public class GenericSimpleScriptedTestProtocol<T extends HostSystem, SELF extends GenericSimpleScriptedTestProtocol<?, ?>> {
+
+ public interface PrepareCommand<T extends HostSystem> {
+ void prepare(T system) throws Exception;
+ }
+
+ private static class CreateUser implements PrepareCommand<HostSystem> {
+
+ final String user;
+ final String password;
+
+ CreateUser(String user, String password) {
+ this.user = user;
+ this.password = password;
+ }
+
+ public void prepare(HostSystem system) throws Exception {
+ system.addUser(user, password);
+ }
+ }
+
+ private final FileProtocolSessionBuilder builder = new FileProtocolSessionBuilder();
+ private final String scriptDirectory;
+
+ /** The Protocol session which is run before the testElements */
+ private ProtocolSession preElements = new ProtocolSession();
+
+ /** The Protocol session which contains the tests elements */
+ private ProtocolSession testElements = new ProtocolSession();
+
+ /** The Protocol session which is run after the testElements. */
+ private ProtocolSession postElements = new ProtocolSession();
+
+ private final T hostSystem;
+ private final List<PrepareCommand<? super T>> prepareCommands;
+ private Locale locale;
+
+ public GenericSimpleScriptedTestProtocol(String scriptDirectory, T hostSystem) throws Exception {
+ this.scriptDirectory = scriptDirectory;
+ this.hostSystem = hostSystem;
+ this.locale = Locale.getDefault();
+ this.prepareCommands = new ArrayList<PrepareCommand<? super T>>();
+ }
+
+ @SuppressWarnings("unchecked")
+ public SELF withLocale(Locale locale) {
+ this.locale = locale;
+ return (SELF) this;
+ }
+
+ @SuppressWarnings("unchecked")
+ public SELF withUser(String user, String password) {
+ prepareCommands.add(new CreateUser(user, password));
+ return (SELF) this;
+ }
+
+ @SuppressWarnings("unchecked")
+ public SELF withPreparedCommand(PrepareCommand<? super T> command) {
+ prepareCommands.add(command);
+ return (SELF) this;
+ }
+
+ public ProtocolSession preElements() {
+ return preElements;
+ }
+
+ public ProtocolSession testElements() {
+ return testElements;
+ }
+
+ public ProtocolSession postElements() {
+ return postElements;
+ }
+
+ /**
+ * Reads test elements from the protocol session file and adds them to the
+ * {@link #testElements} ProtocolSession. Then calls {@link #runSessions}.
+ * @param locale
+ * execute the test using this locale
+ */
+ public void run(String fileName) throws Exception {
+ prepare();
+ Locale previousLocale = Locale.getDefault();
+ try {
+ Locale.setDefault(locale);
+ addTestFile(fileName + ".test", testElements);
+ runSessions(hostSystem);
+ } finally {
+ Locale.setDefault(previousLocale);
+ }
+ }
+
+ private void prepare() throws Exception {
+ for (PrepareCommand<? super T> cmd: prepareCommands) {
+ cmd.prepare(hostSystem);
+ }
+ }
+
+ /**
+ * <p>
+ * Runs the pre,test and post protocol sessions against a local copy of the
+ * Server. This is useful for rapid development and debugging.
+ * </p>
+ * Instead of sending requests to a socket connected to a running instance
+ * of James, this method uses the {@link HostSystem} to simplify testing.
+ * One mock instance is required per protocol session/connection.
+ */
+ private void runSessions(HostSystem hostSystem) throws Exception {
+ class SessionContinuation implements Continuation {
+
+ public ProtocolSession session;
+
+ public void doContinue() {
+ if (session != null) {
+ session.doContinue();
+ }
+ }
+
+ }
+ SessionContinuation continuation = new SessionContinuation();
+
+ Session[] sessions = new Session[testElements.getSessionCount()];
+
+ for (int i = 0; i < sessions.length; i++) {
+ sessions[i] = hostSystem.newSession(continuation);
+ sessions[i].start();
+ }
+ try {
+ continuation.session = preElements;
+ preElements.runSessions(sessions);
+ continuation.session = testElements;
+ testElements.runSessions(sessions);
+ continuation.session = postElements;
+ postElements.runSessions(sessions);
+ }
+ finally {
+ for (Session session : sessions) {
+ session.stop();
+ }
+ }
+ }
+
+ /**
+ * Finds the protocol session file identified by the test name, and builds
+ * protocol elements from it. All elements from the definition file are
+ * added to the supplied ProtocolSession.
+ *
+ * @param fileName
+ * The name of the file to read
+ * @param session
+ * The ProtocolSession to add elements to.
+ */
+ public void addTestFile(String fileName, ProtocolSession session) throws Exception {
+
+ fileName = scriptDirectory + fileName;
+
+ // Need to find local resource.
+ InputStream is = this.getClass().getResourceAsStream(fileName);
+
+ if (is == null) {
+ throw new Exception("Test Resource '" + fileName + "' not found.");
+ }
+
+ try {
+ builder.addProtocolLinesFromStream(is, session, fileName);
+ }
+ finally {
+ IOUtils.closeQuietly(is);
+ }
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java b/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java
new file mode 100644
index 0000000..f2ca8ff
--- /dev/null
+++ b/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java
@@ -0,0 +1,30 @@
+package org.apache.james.mpt.script;
+
+import org.apache.james.mailbox.model.MailboxPath;
+import org.apache.james.mpt.api.ImapHostSystem;
+
+public class ImapScriptedTestProtocol extends GenericSimpleScriptedTestProtocol<ImapHostSystem, ImapScriptedTestProtocol> {
+
+
+ private static class CreateMailbox implements PrepareCommand<ImapHostSystem> {
+
+ final MailboxPath mailboxPath;
+
+ CreateMailbox(MailboxPath mailboxPath) {
+ this.mailboxPath = mailboxPath;
+ }
+
+ public void prepare(ImapHostSystem system) throws Exception {
+ system.createMailbox(mailboxPath);
+ }
+ }
+
+ public ImapScriptedTestProtocol(String scriptDirectory, ImapHostSystem hostSystem) throws Exception {
+ super(scriptDirectory, hostSystem);
+ }
+
+ public ImapScriptedTestProtocol withMailbox(MailboxPath mailboxPath) {
+ return withPreparedCommand(new CreateMailbox(mailboxPath));
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java b/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java
index f412df6..30c7210 100644
--- a/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java
+++ b/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java
@@ -1,181 +1,11 @@
-/****************************************************************
- * 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.script;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.james.mpt.api.Continuation;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.api.Session;
-import org.apache.james.mpt.protocol.FileProtocolSessionBuilder;
-import org.apache.james.mpt.protocol.ProtocolSession;
-
-public final class SimpleScriptedTestProtocol {
-
- private final FileProtocolSessionBuilder builder = new FileProtocolSessionBuilder();
- private final String scriptDirectory;
-
- /** The Protocol session which is run before the testElements */
- private ProtocolSession preElements = new ProtocolSession();
- /** The Protocol session which contains the tests elements */
- private ProtocolSession testElements = new ProtocolSession();
-
- /** The Protocol session which is run after the testElements. */
- private ProtocolSession postElements = new ProtocolSession();
-
- private Locale locale;
- private HostSystem hostSystem;
- private Map<String, String> users;
+public class SimpleScriptedTestProtocol extends GenericSimpleScriptedTestProtocol<HostSystem, SimpleScriptedTestProtocol> {
public SimpleScriptedTestProtocol(String scriptDirectory, HostSystem hostSystem) throws Exception {
- this.scriptDirectory = scriptDirectory;
- this.hostSystem = hostSystem;
- this.locale = Locale.getDefault();
- this.users = new HashMap<String, String>();
- }
-
- public SimpleScriptedTestProtocol withLocale(Locale locale) {
- this.locale = locale;
- return this;
- }
-
- public SimpleScriptedTestProtocol withUser(String userAtDomain, String password) {
- users.put(userAtDomain, password);
- return this;
- }
-
- public ProtocolSession preElements() {
- return preElements;
- }
-
- public ProtocolSession testElements() {
- return testElements;
- }
-
- public ProtocolSession postElements() {
- return postElements;
+ super(scriptDirectory, hostSystem);
}
- /**
- * Reads test elements from the protocol session file and adds them to the
- * {@link #testElements} ProtocolSession. Then calls {@link #runSessions}.
- * @param locale
- * execute the test using this locale
- */
- public void run(String fileName) throws Exception {
- createUsers();
- Locale previousLocale = Locale.getDefault();
- try {
- Locale.setDefault(locale);
- addTestFile(fileName + ".test", testElements);
- runSessions(hostSystem);
- } finally {
- Locale.setDefault(previousLocale);
- }
- }
-
-
- private void createUsers() throws Exception {
- for (Entry<String, String> user: users.entrySet()) {
- hostSystem.addUser(user.getKey(), user.getValue());
- }
- }
-
- /**
- * <p>
- * Runs the pre,test and post protocol sessions against a local copy of the
- * Server. This is useful for rapid development and debugging.
- * </p>
- * Instead of sending requests to a socket connected to a running instance
- * of James, this method uses the {@link HostSystem} to simplify testing.
- * One mock instance is required per protocol session/connection.
- */
- private void runSessions(HostSystem hostSystem) throws Exception {
- class SessionContinuation implements Continuation {
-
- public ProtocolSession session;
-
- public void doContinue() {
- if (session != null) {
- session.doContinue();
- }
- }
-
- }
- SessionContinuation continuation = new SessionContinuation();
-
- Session[] sessions = new Session[testElements.getSessionCount()];
-
- for (int i = 0; i < sessions.length; i++) {
- sessions[i] = hostSystem.newSession(continuation);
- sessions[i].start();
- }
- try {
- continuation.session = preElements;
- preElements.runSessions(sessions);
- continuation.session = testElements;
- testElements.runSessions(sessions);
- continuation.session = postElements;
- postElements.runSessions(sessions);
- }
- finally {
- for (Session session : sessions) {
- session.stop();
- }
- }
- }
-
- /**
- * Finds the protocol session file identified by the test name, and builds
- * protocol elements from it. All elements from the definition file are
- * added to the supplied ProtocolSession.
- *
- * @param fileName
- * The name of the file to read
- * @param session
- * The ProtocolSession to add elements to.
- */
- public void addTestFile(String fileName, ProtocolSession session) throws Exception {
-
- fileName = scriptDirectory + fileName;
-
- // Need to find local resource.
- InputStream is = this.getClass().getResourceAsStream(fileName);
-
- if (is == null) {
- throw new Exception("Test Resource '" + fileName + "' not found.");
- }
-
- try {
- builder.addProtocolLinesFromStream(is, session, fileName);
- }
- finally {
- IOUtils.closeQuietly(is);
- }
-
- }
-
-}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java
new file mode 100644
index 0000000..36a7d4f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraAuthenticatePlain extends AuthenticatePlain {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java
new file mode 100644
index 0000000..723aefc
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraAuthenticatedState extends AuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java
new file mode 100644
index 0000000..5dba708
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraConcurrentSessions extends ConcurrentSessions {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
new file mode 100644
index 0000000..6e59ec6
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why it was no enabled on cassandra ?")
+public class CassandraCondstore extends Condstore {
+
+ private JamesImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(JamesImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected JamesImapHostSystem createJamesImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java
new file mode 100644
index 0000000..4e55db3
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraCopy extends Copy {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java
new file mode 100644
index 0000000..bef1471
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraEvents extends Events {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java
new file mode 100644
index 0000000..856529a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraExpunge extends Expunge {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java
new file mode 100644
index 0000000..2b2c203
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraFetch extends Fetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java
new file mode 100644
index 0000000..4cb3bc8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraFetchBodySection extends FetchBodySection {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java
new file mode 100644
index 0000000..35573d9
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraFetchBodyStructure extends FetchBodyStructure {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java
new file mode 100644
index 0000000..2edc494
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraFetchHeaders extends FetchHeaders {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java
new file mode 100644
index 0000000..70e0845
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraListing extends Listing {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java
new file mode 100644
index 0000000..118acc3
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraMailboxAnnotation extends MailboxAnnotation {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java
deleted file mode 100644
index ee8d4c9..0000000
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************
- * 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.AuthenticatePlain;
-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.MailboxAnnotation;
-import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
-import org.apache.james.mpt.imapmailbox.suite.Move;
-import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
-import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
-import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
-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.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runners.Suite.SuiteClasses;
-
-@GuiceModules({ CassandraMailboxTestModule.class })
-@SuiteClasses({
- AuthenticatedState.class,
- AuthenticatePlain.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,
- QuotaTest.class,
- UserFlagsSupport.class,
- Move.class,
- SelectedInbox.class,
- SelectedState.class,
- UidSearch.class,
- MailboxAnnotation.class,
- MailboxWithLongNameError.class
-})
-public class CassandraMailboxTest extends AbstractMailboxTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java
new file mode 100644
index 0000000..1773a58
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraMailboxWithLongNameError extends MailboxWithLongNameError {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..1be29c0
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameSuccess.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("do we have a JIRA for that ?")
+public class CassandraMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java
new file mode 100644
index 0000000..51ad3ad
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Move;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraMove extends Move {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java
new file mode 100644
index 0000000..f05b5e8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraNonAuthenticatedState extends NonAuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java
new file mode 100644
index 0000000..53978ac
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraPartialFetch extends PartialFetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java
new file mode 100644
index 0000000..6054655
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraQuotaTest extends QuotaTest {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java
new file mode 100644
index 0000000..61a031f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Rename;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraRename extends Rename {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java
new file mode 100644
index 0000000..e7c1391
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Search;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraSearch extends Search {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java
new file mode 100644
index 0000000..d73df8f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Security;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraSecurity extends Security {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java
new file mode 100644
index 0000000..71c21d9
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Select;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraSelect extends Select {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java
new file mode 100644
index 0000000..00f0741
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraSelectedInbox extends SelectedInbox {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java
new file mode 100644
index 0000000..a933859
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraSelectedState extends SelectedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java
new file mode 100644
index 0000000..c3c0836
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraUidSearch extends UidSearch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java
new file mode 100644
index 0000000..3859e45
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraUidSearchOnIndex extends UidSearchOnIndex {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java
new file mode 100644
index 0000000..9f68003
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.cassandra;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraUserFlagsSupport extends UserFlagsSupport {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
index 79932dd..9a9077a 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/host/CassandraHostSystem.java
@@ -81,7 +81,7 @@ public class CassandraHostSystem extends JamesImapHostSystem {
Feature.ANNOTATION_SUPPORT);
private final CassandraMailboxManager mailboxManager;
- private final CassandraCluster cassandraClusterSingleton;
+ private final CassandraCluster cassandra;
private final CassandraPerUserMaxQuotaManager perUserMaxQuotaManager;
public CassandraHostSystem() throws Exception {
@@ -100,8 +100,8 @@ public class CassandraHostSystem extends JamesImapHostSystem {
new CassandraAttachmentModule(),
new CassandraAnnotationModule(),
new CassandraApplicableFlagsModule());
- cassandraClusterSingleton = CassandraCluster.create(mailboxModule);
- com.datastax.driver.core.Session session = cassandraClusterSingleton.getConf();
+ cassandra = CassandraCluster.create(mailboxModule);
+ com.datastax.driver.core.Session session = cassandra.getConf();
CassandraModSeqProvider modSeqProvider = new CassandraModSeqProvider(session);
CassandraUidProvider uidProvider = new CassandraUidProvider(session);
CassandraTypesProvider typesProvider = new CassandraTypesProvider(mailboxModule, session);
@@ -158,12 +158,18 @@ public class CassandraHostSystem extends JamesImapHostSystem {
configure(new DefaultImapDecoderFactory().buildImapDecoder(),
new DefaultImapEncoderFactory().buildImapEncoder(),
DefaultImapProcessorFactory.createDefaultProcessor(mailboxManager, subscriptionManager, quotaManager, quotaRootResolver, new DefaultMetricFactory()));
- cassandraClusterSingleton.ensureAllTables();
+ cassandra.ensureAllTables();
}
@Override
+ public void afterTest() throws Exception {
+ super.afterTest();
+ cassandra.close();
+ }
+
+ @Override
protected void resetData() throws Exception {
- cassandraClusterSingleton.clearAllTables();
+ cassandra.clearAllTables();
}
@Override
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/pom.xml b/mpt/impl/imap-mailbox/core/pom.xml
index cca9eef..72092b7 100644
--- a/mpt/impl/imap-mailbox/core/pom.xml
+++ b/mpt/impl/imap-mailbox/core/pom.xml
@@ -55,10 +55,6 @@
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
- <artifactId>apache-james-mpt-onami-test</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.james</groupId>
<artifactId>james-server-data-memory</artifactId>
</dependency>
<dependency>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[02/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectMockObjectTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectMockObjectTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectMockObjectTestCase.java
deleted file mode 100644
index 46956a6..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectMockObjectTestCase.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import javax.inject.Inject;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.data.HelloWorld;
-import org.apache.james.mpt.onami.test.data.SimpleModule;
-import org.apache.james.mpt.onami.test.data.TelephonService;
-import org.easymock.EasyMock;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.google.inject.Injector;
-
-@RunWith(OnamiRunner.class)
-@GuiceModules(SimpleModule.class)
-public class InjectMockObjectTestCase extends AbstractMockTestCase {
-
- // Create and inject a simple EasyMock Strict mock
- @Mock
- private TelephonService telephonServiceMock;
-
- @Inject
- Injector injector;
-
- @Inject
- private HelloWorld helloWorld;
-
- @Test
- public void testMock() {
- EasyMock.expect(providedMock.go()).andReturn("Ciao");
- EasyMock.replay(providedMock);
-
- Assert.assertNotNull(this.providedMock);
- Assert.assertEquals("Ciao", helloWorld.sayHalloByService());
- EasyMock.verify(providedMock);
- }
-
- @Test
- public void testMock2() {
- EasyMock.expect(providedMock.go()).andReturn("Ciao");
- EasyMock.replay(providedMock);
-
- Assert.assertNotNull(this.providedMock);
- Assert.assertEquals("Ciao", helloWorld.sayHalloByService());
- EasyMock.verify(providedMock);
- }
-
- @Test
- public void testStrickMock() {
- EasyMock.expect(telephonServiceMock.getTelephonNumber()).andReturn("1234567890");
- providedMock.call("1234567890");
- EasyMock.expectLastCall().once();
- EasyMock.replay(telephonServiceMock);
- EasyMock.replay(providedMock);
-
- helloWorld.callHelloWorldTelephon();
-
- EasyMock.verify(telephonServiceMock);
- EasyMock.verify(providedMock);
-
- // reset manually the mock object. Flag resettable is false!!!
- EasyMock.reset(telephonServiceMock);
- }
-
- @Test
- public void testStrickMock2() {
- Assert.assertNotNull(telephonServiceMock);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectModuleClassTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectModuleClassTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectModuleClassTestCase.java
deleted file mode 100644
index 9fc92bb..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectModuleClassTestCase.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import javax.inject.Inject;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.name.Named;
-import com.google.inject.name.Names;
-
-@RunWith(OnamiRunner.class)
-public class InjectModuleClassTestCase extends AbstractModule {
-
- @Override
- public void configure() {
- bind(Integer.class).annotatedWith(Names.named("numeber.version")).toInstance(10);
- }
-
- @Inject
- @Named("numeber.version")
- private Integer version;
-
- @Test
- public void testInjectModuleClass() {
- Assert.assertNotNull(version);
- Assert.assertEquals(10, version.intValue());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectStaticSimpleTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectStaticSimpleTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectStaticSimpleTestCase.java
deleted file mode 100644
index 1541581..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/InjectStaticSimpleTestCase.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-
-import javax.inject.Inject;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.annotation.GuiceProvidedModules;
-import org.apache.james.mpt.onami.test.data.ComplexModule;
-import org.apache.james.mpt.onami.test.data.HelloWorld;
-import org.apache.james.mpt.onami.test.data.SimpleModule;
-import org.apache.james.mpt.onami.test.data.WhoIm;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.google.inject.Module;
-
-@RunWith(OnamiRunner.class)
-@GuiceModules(SimpleModule.class)
-public class InjectStaticSimpleTestCase {
-
- /*
- * Any static filed will be injecteded once before creation of SimpleTest Class
- */
- @Inject
- public static HelloWorld helloWorld;
-
- @Inject
- public static WhoIm whoIm;
-
- @GuiceProvidedModules
- public static Module createComplexModule() {
- return new ComplexModule("Marco Speranza");
- }
-
- @Test
- public void testHelloWorld() {
- Assert.assertNotNull(helloWorld);
- Assert.assertEquals("Hello World!!!!", helloWorld.sayHallo());
- }
-
- @Test
- public void testWhoIm() {
- Assert.assertNotNull(whoIm);
- Assert.assertEquals("Marco Speranza", whoIm.sayWhoIm());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/MockTypeTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/MockTypeTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/MockTypeTestCase.java
deleted file mode 100644
index 262bb02..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/MockTypeTestCase.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.annotation.MockObjType;
-import org.apache.james.mpt.onami.test.data.Service;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-
-@RunWith(OnamiRunner.class)
-public class MockTypeTestCase {
-
- @Mock(type = MockObjType.EASY_MOCK_STRICT)
- Service service;
-
- @Test
- public void test() {
- Assert.assertNotNull(service);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/MockitoFrameworkTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/MockitoFrameworkTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/MockitoFrameworkTestCase.java
deleted file mode 100644
index 0e42713..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/MockitoFrameworkTestCase.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import javax.inject.Inject;
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.data.HelloWorld;
-import org.apache.james.mpt.onami.test.data.TelephonService;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(OnamiRunner.class)
-public class MockitoFrameworkTestCase extends AbstractMockitoTestCase {
-
- /*
- * Any NON-static filed will be injected before run each tests.
- */
- @Inject
- private HelloWorld helloWorldNotStatic;
-
- @Mock
- private TelephonService service;
-
- @BeforeClass
- public static void setUpClass() {
- }
-
- @Test
- public void testInjectNotStatic() {
- Assert.assertNotNull(helloWorldNotStatic);
- Assert.assertEquals("Hello World!!!!", helloWorldNotStatic.sayHallo());
- Assert.assertNotNull(service);
- Assert.assertNotNull(providedMock);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/OnamiSuiteTest.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/OnamiSuiteTest.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/OnamiSuiteTest.java
deleted file mode 100644
index 9f7cfd1..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/OnamiSuiteTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(OnamiSuite.class)
-@SuiteClasses({InjectDependingMockObjectTestCase.class, InjectFromSuperClassTestCase.class})
-public class OnamiSuiteTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/ServiceMockProviderTest.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/ServiceMockProviderTest.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/ServiceMockProviderTest.java
deleted file mode 100644
index d076d36..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/ServiceMockProviderTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.data.Service;
-import org.apache.james.mpt.onami.test.data.ServiceMockProvider;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-
-@RunWith(OnamiRunner.class)
-public class ServiceMockProviderTest {
-
- @Mock(providedBy = "providerMethod", providerClass = ServiceMockProvider.class)
- private Service service;
-
- @Test
- public void test() {
- Assert.assertNotNull(service);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/SimpleTest.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/SimpleTest.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/SimpleTest.java
deleted file mode 100644
index 2a341d6..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/SimpleTest.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-
-import javax.inject.Inject;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.data.HelloWorld;
-import org.apache.james.mpt.onami.test.data.SimpleModule;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(OnamiRunner.class)
-@GuiceModules(SimpleModule.class)
-public class SimpleTest {
-
- /*
- * Any NON-static filed will be injecteded before run each tests.
- */
- @Inject
- private HelloWorld helloWorldNotStatic;
-
- @BeforeClass
- public static void setUpClass() {
- }
-
- @Test
- public void testInjectNotStatic() {
- Assert.assertNotNull(helloWorldNotStatic);
- Assert.assertEquals("Hello World!!!!", helloWorldNotStatic.sayHallo());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ComplexModule.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ComplexModule.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ComplexModule.java
deleted file mode 100644
index 3632a1d..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ComplexModule.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-import com.google.inject.AbstractModule;
-
-public class ComplexModule extends AbstractModule {
-
- private final String name;
-
- public ComplexModule(String name) {
- this.name = name;
- }
-
- @Override
- protected void configure() {
- bind(WhoIm.class).toInstance(new WhoIm(name));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/HelloWordAnnotated.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/HelloWordAnnotated.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/HelloWordAnnotated.java
deleted file mode 100644
index f011333..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/HelloWordAnnotated.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-import javax.inject.Inject;
-
-import com.google.inject.name.Named;
-
-public class HelloWordAnnotated {
-
- @Inject
- @TestAnnotation
- Service service;
-
- @Inject
- @Named("test.named")
- Service named;
-
- public String go() {
- return service.go();
- }
-
- public String getNamed() {
- return named.go();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/HelloWorld.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/HelloWorld.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/HelloWorld.java
deleted file mode 100644
index c81001c..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/HelloWorld.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-import java.util.List;
-
-import javax.inject.Singleton;
-
-import com.google.inject.Inject;
-
-@Singleton
-public class HelloWorld {
-
- @Inject(optional = true)
- private Service service;
-
- @Inject(optional = true)
- private TelephonService telephon;
-
- @Inject(optional = true)
- private List<Service> services;
-
- public String sayHallo() {
- return "Hello World!!!!";
- }
-
- public String sayHalloByService() {
- return service.go();
- }
-
- public void callHelloWorldTelephon() {
- String number = telephon.getTelephonNumber();
- service.call(number);
- }
-
- public void sayHalloByServiceLists() {
- for (Service service : services) {
- service.go();
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/Service.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/Service.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/Service.java
deleted file mode 100644
index 5f0f6c3..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/Service.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-public interface Service {
-
- String go();
-
- void call(String value);
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceImpl.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceImpl.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceImpl.java
deleted file mode 100644
index bc891d6..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceImpl.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-public class ServiceImpl implements Service {
-
- public void call(String value) {
- // do nothing
- }
-
- public String go() {
- return "It's real class";
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceMockProvider.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceMockProvider.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceMockProvider.java
deleted file mode 100644
index 3592d42..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceMockProvider.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-import org.easymock.EasyMock;
-
-public class ServiceMockProvider {
-
- public static Service providerMethod() {
- Service mockedService = EasyMock.createNiceMock(Service.class);
- return mockedService;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceModule.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceModule.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceModule.java
deleted file mode 100644
index 8fa7fa6..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/ServiceModule.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-import com.google.inject.AbstractModule;
-
-public class ServiceModule extends AbstractModule {
-
- @Override
- protected void configure() {
- bind(Service.class).to(ServiceImpl.class).asEagerSingleton();
- bind(TelephonService.class).to(TelephonServiceImpl.class).asEagerSingleton();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/SimpleModule.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/SimpleModule.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/SimpleModule.java
deleted file mode 100644
index 7c3a084..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/SimpleModule.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-import com.google.inject.AbstractModule;
-
-public class SimpleModule extends AbstractModule {
-
- @Override
- protected void configure() {
- bind(HelloWorld.class);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TelephonService.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TelephonService.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TelephonService.java
deleted file mode 100644
index 1699f03..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TelephonService.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-public interface TelephonService {
-
- String getTelephonNumber();
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TelephonServiceImpl.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TelephonServiceImpl.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TelephonServiceImpl.java
deleted file mode 100644
index 54b1044..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TelephonServiceImpl.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-public class TelephonServiceImpl
- implements TelephonService {
-
- public String getTelephonNumber() {
- return "It's real class";
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TestAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TestAnnotation.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TestAnnotation.java
deleted file mode 100644
index 2303176..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TestAnnotation.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TestAnnotation {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TestAnnotation2.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TestAnnotation2.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TestAnnotation2.java
deleted file mode 100644
index 6b6be9b..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/TestAnnotation2.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-
-import javax.inject.Qualifier;
-
-@Qualifier
-@Retention(RetentionPolicy.RUNTIME)
-public @interface TestAnnotation2 {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/WhoIm.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/WhoIm.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/WhoIm.java
deleted file mode 100644
index cb6bc11..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/data/WhoIm.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- * 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.onami.test.data;
-
-public class WhoIm {
-
- private final String name;
-
- public WhoIm(String name) {
- this.name = name;
- }
-
- public String sayWhoIm() {
- return name;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/guice/MockAnnotatedWithTestCase.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/guice/MockAnnotatedWithTestCase.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/guice/MockAnnotatedWithTestCase.java
deleted file mode 100644
index a0b4e29..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/guice/MockAnnotatedWithTestCase.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************
- * 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.onami.test.guice;
-
-import javax.inject.Inject;
-
-import org.apache.james.mpt.onami.test.OnamiRunner;
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.data.HelloWordAnnotated;
-import org.apache.james.mpt.onami.test.data.Service;
-import org.apache.james.mpt.onami.test.data.TestAnnotation;
-import org.easymock.EasyMock;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(OnamiRunner.class)
-public class MockAnnotatedWithTestCase {
-
- @Mock(annotatedWith = TestAnnotation.class)
- private Service service2;
-
- @Mock
- private Service service;
-
- @Mock(namedWith = "test.named")
- private Service serviceNamed;
-
- @Inject
- private HelloWordAnnotated seviceImplAnnotated;
-
- @Test
- public void test()
- throws Exception {
- Assert.assertNotNull(service2);
- Assert.assertNotNull(service);
- Assert.assertNotNull(serviceNamed);
- }
-
- @Test
- public void test3()
- throws Exception {
- Assert.assertNotNull(service2);
- Assert.assertNotNull(serviceNamed);
-
- EasyMock.expect(service2.go()).andReturn("Mocked injected class annotated").anyTimes();
- EasyMock.expect(serviceNamed.go()).andReturn("Mocked injected class named").anyTimes();
- EasyMock.replay(service2, serviceNamed);
-
- Assert.assertEquals("Mocked injected class annotated", service2.go());
- Assert.assertEquals("Mocked injected class annotated", seviceImplAnnotated.go());
- Assert.assertEquals("Mocked injected class named", seviceImplAnnotated.getNamed());
- EasyMock.verify(service2);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/guice/TestCustomInjectionTest.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/guice/TestCustomInjectionTest.java b/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/guice/TestCustomInjectionTest.java
deleted file mode 100644
index d3e0e02..0000000
--- a/mpt/onami-test/src/test/java/org/apache/james/mpt/onami/test/guice/TestCustomInjectionTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************
- * 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.onami.test.guice;
-
-import javax.inject.Inject;
-
-import org.apache.james.mpt.onami.test.OnamiRunner;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.data.HelloWorld;
-import org.apache.james.mpt.onami.test.data.Service;
-import org.apache.james.mpt.onami.test.data.ServiceModule;
-import org.apache.james.mpt.onami.test.data.TelephonService;
-import org.easymock.EasyMock;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-@RunWith(OnamiRunner.class)
-@GuiceModules(ServiceModule.class)
-public class TestCustomInjectionTest {
-
- @Mock
- private static Service service;
-
- @Inject
- private TelephonService telephonService;
-
- @Inject
- private HelloWorld helloWorld;
-
- @BeforeClass
- public static void setUp() {
- Assert.assertNotNull(service);
- // service.go();
- }
-
- @Test
- public void test()
- throws Exception {
- Assert.assertNotNull(service);
- Assert.assertNotNull(telephonService);
- Assert.assertNotNull(helloWorld);
- }
-
- @Test
- public void testOverideModule()
- throws Exception {
- Assert.assertNotNull(service);
- Assert.assertNotNull(telephonService);
- Assert.assertEquals("It's real class", telephonService.getTelephonNumber());
-
- EasyMock.expect(service.go()).andReturn("Mocked injected class");
- EasyMock.replay(service);
-
- Assert.assertEquals("Mocked injected class", helloWorld.sayHalloByService());
- EasyMock.verify(service);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/test/resources/log4j.properties b/mpt/onami-test/src/test/resources/log4j.properties
deleted file mode 100644
index 3836f2c..0000000
--- a/mpt/onami-test/src/test/resources/log4j.properties
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# 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.
-#
-
-# Set root category priority to INFO and its only appender to CONSOLE.
-#log4j.rootCategory=DEBUG, CONSOLE
-
-# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
-#log4j.logger.org.apache.onami=CONSOLE
-
-# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
-#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
-#log4j.appender.CONSOLE.Threshold=DEBUG
-#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
-#log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
-
-
-
-# Specify the handlers to create in the root logger
-# (all loggers are children of the root logger)
-# The following creates two handlers
-handlers = java.util.logging.ConsoleHandler
-
-# Set the default logging level for the root logger
-.level = ALL
-
-# Set the default logging level for new ConsoleHandler instances
-java.util.logging.ConsoleHandler.level = ALL
-
-# Set the default formatter for new ConsoleHandler instances
-java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/pom.xml b/mpt/pom.xml
index 5562035..65607ed 100644
--- a/mpt/pom.xml
+++ b/mpt/pom.xml
@@ -44,7 +44,6 @@
<module>impl/managesieve</module>
<module>impl/smtp</module>
<module>mavenplugin</module>
- <module>onami-test</module>
</modules>
<issueManagement>
@@ -117,11 +116,6 @@
<version>${project.version}</version>
<type>test-jar</type>
</dependency>
- <dependency>
- <groupId>org.apache.james</groupId>
- <artifactId>apache-james-mpt-onami-test</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- Other Apache James sub projects -->
<dependency>
<groupId>org.apache.james</groupId>
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[12/21] james-project git commit: MPT-39 remove crazy abstract test
class hierarchy
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
index f083caa..988fe8e 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Fetch.java
@@ -24,135 +24,201 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class Fetch extends BaseSelectedState {
+public class Fetch implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Fetch() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testFetchEnvelopeUS() throws Exception {
- scriptTest("FetchEnvelope", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchEnvelope");
}
@Test
public void testFetchEnvelopeIT() throws Exception {
- scriptTest("FetchEnvelope", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchEnvelope");
}
@Test
public void testFetchEnvelopeKOREA() throws Exception {
- scriptTest("FetchEnvelope", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchEnvelope");
}
@Test
public void testFetchTextUS() throws Exception {
- scriptTest("FetchText", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchText");
}
@Test
public void testFetchBodyNoSectionUS() throws Exception {
- scriptTest("FetchBodyNoSection", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchBodyNoSection");
}
@Test
public void testFetchTextIT() throws Exception {
- scriptTest("FetchText", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchText");
}
@Test
public void testFetchBodyNoSectionIT() throws Exception {
- scriptTest("FetchBodyNoSection", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchBodyNoSection");
}
@Test
public void testFetchTextKOREA() throws Exception {
- scriptTest("FetchText", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchText");
}
@Test
public void testFetchBodyNoSectionKOREA() throws Exception {
- scriptTest("FetchBodyNoSection", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchBodyNoSection");
}
@Test
public void testFetchRFC822US() throws Exception {
- scriptTest("FetchRFC822", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchRFC822");
}
@Test
public void testFetchRFC822TextUS() throws Exception {
- scriptTest("FetchRFC822Text", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchRFC822Text");
}
@Test
public void testFetchRFC822HeaderUS() throws Exception {
- scriptTest("FetchRFC822Header", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchRFC822Header");
}
@Test
public void testFetchRFC822KOREA() throws Exception {
- scriptTest("FetchRFC822", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchRFC822");
}
@Test
public void testFetchRFC822TextKOREA() throws Exception {
- scriptTest("FetchRFC822Text", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchRFC822Text");
}
@Test
public void testFetchRFC822HeaderKOREA() throws Exception {
- scriptTest("FetchRFC822Header", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchRFC822Header");
}
@Test
public void testFetchRFC822ITALY() throws Exception {
- scriptTest("FetchRFC822", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchRFC822");
}
@Test
public void testFetchRFC822TextITALY() throws Exception {
- scriptTest("FetchRFC822Text", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchRFC822Text");
}
@Test
public void testFetchRFC822HeaderITALY() throws Exception {
- scriptTest("FetchRFC822Header", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchRFC822Header");
}
@Test
public void testFetchInternalDateUS() throws Exception {
- scriptTest("FetchInternalDate", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchInternalDate");
}
@Test
public void testFetchInternalDateITALY() throws Exception {
- scriptTest("FetchInternalDate", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchInternalDate");
}
@Test
public void testFetchInternalDateKOREA() throws Exception {
- scriptTest("FetchInternalDate", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchInternalDate");
}
@Test
public void testFetchFetchRfcMixedUS() throws Exception {
- scriptTest("FetchRFC822Mixed", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchRFC822Mixed");
}
@Test
public void testFetchFetchRfcMixedKOREA() throws Exception {
- scriptTest("FetchRFC822Mixed", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchRFC822Mixed");
}
@Test
public void testFetchFetchRfcMixedITALY() throws Exception {
- scriptTest("FetchRFC822Mixed", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchRFC822Mixed");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
index e9f8b91..1e5a355 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodySection.java
@@ -24,60 +24,95 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class FetchBodySection extends BaseSelectedState {
+public class FetchBodySection implements ImapTestConstants {
@Inject
private static HostSystem system;
- public FetchBodySection() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testFetchMultipartAlternativeUS() throws Exception {
- scriptTest("FetchMultipartAlternative", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchMultipartAlternative");
}
@Test
public void testFetchMultipartAlternativeITALY() throws Exception {
- scriptTest("FetchMultipartAlternative", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchMultipartAlternative");
}
@Test
public void testFetchMultipartAlternativeKOREA() throws Exception {
- scriptTest("FetchMultipartAlternative", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchMultipartAlternative");
}
@Test
public void testFetchMultipartMixedUS() throws Exception {
- scriptTest("FetchMultipartMixed", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchMultipartMixed");
}
@Test
public void testFetchMultipartMixedITALY() throws Exception {
- scriptTest("FetchMultipartMixed", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchMultipartMixed");
}
@Test
public void testFetchMultipartMixedKOREA() throws Exception {
- scriptTest("FetchMultipartMixed", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchMultipartMixed");
}
@Test
public void testFetchMultipartMixedComplexUS() throws Exception {
- scriptTest("FetchMultipartMixedComplex", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchMultipartMixedComplex");
}
@Test
public void testFetchMultipartMixedComplexITALY() throws Exception {
- scriptTest("FetchMultipartMixedComplex", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchMultipartMixedComplex");
}
@Test
public void testFetchMultipartMixedComplexKOREA() throws Exception {
- scriptTest("FetchMultipartMixedComplex", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchMultipartMixedComplex");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
index 3fa2fd3..19596a6 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchBodyStructure.java
@@ -24,75 +24,117 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class FetchBodyStructure extends BaseSelectedState {
+public class FetchBodyStructure implements ImapTestConstants {
@Inject
private static HostSystem system;
- public FetchBodyStructure() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testFetchFetchSimpleBodyStructureUS() throws Exception {
- scriptTest("FetchSimpleBodyStructure", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchSimpleBodyStructure");
}
@Test
public void testFetchFetchSimpleBodyStructureKOREA() throws Exception {
- scriptTest("FetchSimpleBodyStructure", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchSimpleBodyStructure");
}
@Test
public void testFetchFetchSimpleBodyStructureITALY() throws Exception {
- scriptTest("FetchSimpleBodyStructure", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchSimpleBodyStructure");
}
@Test
public void testFetchFetchMultipartBodyStructureUS() throws Exception {
- scriptTest("FetchMultipartBodyStructure", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchMultipartBodyStructure");
}
@Test
public void testFetchFetchMultipartBodyStructureKOREA() throws Exception {
- scriptTest("FetchMultipartBodyStructure", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchMultipartBodyStructure");
}
@Test
public void testFetchFetchMultipartBodyStructureITALY() throws Exception {
- scriptTest("FetchMultipartBodyStructure", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchMultipartBodyStructure");
}
@Test
public void testFetchStructureEmbeddedUS() throws Exception {
- scriptTest("FetchStructureEmbedded", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchStructureEmbedded");
}
@Test
public void testFetchStructureEmbeddedITALY() throws Exception {
- scriptTest("FetchStructureEmbedded", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchStructureEmbedded");
}
@Test
public void testFetchStructureEmbeddedKOREA() throws Exception {
- scriptTest("FetchStructureEmbedded", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchStructureEmbedded");
}
@Test
public void testFetchStructureComplexUS() throws Exception {
- scriptTest("FetchStructureComplex", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchStructureComplex");
}
@Test
public void testFetchStructureComplexITALY() throws Exception {
- scriptTest("FetchStructureComplex", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchStructureComplex");
}
@Test
public void testFetchStructureComplexKOREA() throws Exception {
- scriptTest("FetchStructureComplex", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchStructureComplex");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
index 21da09a..c434359 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/FetchHeaders.java
@@ -24,45 +24,75 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class FetchHeaders extends BaseSelectedState {
+public class FetchHeaders implements ImapTestConstants {
@Inject
private static HostSystem system;
- public FetchHeaders() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testFetchHeaderFieldsUS() throws Exception {
- scriptTest("FetchHeaderFields", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchHeaderFields");
}
@Test
public void testFetchHeaderFieldsITALY() throws Exception {
- scriptTest("FetchHeaderFields", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchHeaderFields");
}
@Test
public void testFetchHeaderFieldsKOREA() throws Exception {
- scriptTest("FetchHeaderFields", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchHeaderFields");
}
@Test
public void testFetchHeaderFieldsNotUS() throws Exception {
- scriptTest("FetchHeaderFieldsNot", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchHeaderFieldsNot");
}
@Test
public void testFetchHeaderFieldsNotITALY() throws Exception {
- scriptTest("FetchHeaderFieldsNot", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchHeaderFieldsNot");
}
@Test
public void testFetchHeaderFieldsNotKOREA() throws Exception {
- scriptTest("FetchHeaderFieldsNot", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchHeaderFieldsNot");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
index 8d661ec..847974b 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Listing.java
@@ -24,45 +24,72 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class Listing extends BaseAuthenticatedState {
+public class Listing implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Listing() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testListPlusUS() throws Exception {
- scriptTest("ListPlus", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ListPlus");
}
@Test
public void testListPercentWildcardUS() throws Exception {
- scriptTest("ListPercentWildcard", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ListPercentWildcard");
}
@Test
public void testListPlusKOREA() throws Exception {
- scriptTest("ListPlus", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ListPlus");
}
@Test
public void testListPercentWildcardKOREA() throws Exception {
- scriptTest("ListPercentWildcard", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ListPercentWildcard");
}
@Test
public void testListPlusITALY() throws Exception {
- scriptTest("ListPlus", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ListPlus");
}
@Test
public void testListPercentWildcardITALY() throws Exception {
- scriptTest("ListPercentWildcard", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ListPercentWildcard");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
index 94211c4..3798cbe 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxAnnotation.java
@@ -26,36 +26,55 @@ import javax.inject.Inject;
import org.apache.james.mpt.api.ImapFeatures;
import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedInbox;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
-public class MailboxAnnotation extends BaseSelectedInbox {
+public class MailboxAnnotation implements ImapTestConstants {
+
@Inject
private static ImapHostSystem system;
-
- public MailboxAnnotation() throws Exception {
- super(system);
- }
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
- public void setup() throws Exception {
+ public void setUp() throws Exception {
Assume.assumeTrue(system.supports(ImapFeatures.Feature.ANNOTATION_SUPPORT));
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testAnnotationUS() throws Exception {
- scriptTest("Annotation", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Annotation");
}
@Test
public void testAnnotationWithLimitationUS() throws Exception {
- scriptTest("AnnotationWithLimitation", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("AnnotationWithLimitation");
}
@Test
public void testAnnotationWithBinaryValue() throws Exception {
- scriptTest("AnnotationWithBinaryData", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("AnnotationWithBinaryData");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
index 84ac78d..b0fda10 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameError.java
@@ -24,20 +24,39 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedInbox;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class MailboxWithLongNameError extends BaseSelectedInbox {
+public class MailboxWithLongNameError implements ImapTestConstants {
@Inject
private static HostSystem system;
-
- public MailboxWithLongNameError() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testWithLongMailboxNameUS() throws Exception {
- scriptTest("CreateErrorWithLongName", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("CreateErrorWithLongName");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
index 1ec3907..ad040d0 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/MailboxWithLongNameSuccess.java
@@ -24,20 +24,34 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedInbox;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
import org.junit.Test;
-public class MailboxWithLongNameSuccess extends BaseSelectedInbox {
+public class MailboxWithLongNameSuccess implements ImapTestConstants {
@Inject
private static HostSystem system;
- public MailboxWithLongNameSuccess() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
-
+
@Test
public void testWithLongMailboxNameUS() throws Exception {
- scriptTest("CreateSuccessWithLongName", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("CreateSuccessWithLongName");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
index e72998c..7d1208c 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Move.java
@@ -25,23 +25,43 @@ import javax.inject.Inject;
import org.apache.james.mpt.api.ImapFeatures;
import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Assume;
+import org.junit.Before;
import org.junit.Test;
-public class Move extends BaseSelectedState {
+public class Move implements ImapTestConstants {
@Inject
private static ImapHostSystem system;
- public Move() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void moveShouldWork() throws Exception {
Assume.assumeTrue(system.supports(ImapFeatures.Feature.MOVE_SUPPORT));
- scriptTest("Move", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Move");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
index 51a99b4..306c448 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/NonAuthenticatedState.java
@@ -24,120 +24,177 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseNonAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class NonAuthenticatedState extends BaseNonAuthenticatedState {
+public class NonAuthenticatedState implements ImapTestConstants {
@Inject
private static HostSystem system;
- public NonAuthenticatedState() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testNoopUS() throws Exception {
- scriptTest("Noop", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Noop");
}
@Test
public void testLogoutUS() throws Exception {
- scriptTest("Logout", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Logout");
}
@Test
public void testCapabilityUS() throws Exception {
- scriptTest("Capability", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Capability");
}
@Test
public void testLoginUS() throws Exception {
- scriptTest("Login", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Login");
}
@Test
public void testValidAuthenticatedUS() throws Exception {
- scriptTest("ValidAuthenticated", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ValidAuthenticated");
}
@Test
public void testValidSelectedUS() throws Exception {
- scriptTest("ValidSelected", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ValidSelected");
}
@Test
public void testAuthenticateUS() throws Exception {
- scriptTest("Authenticate", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Authenticate");
}
@Test
public void testNoopITALY() throws Exception {
- scriptTest("Noop", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Noop");
}
@Test
public void testLogoutITALY() throws Exception {
- scriptTest("Logout", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Logout");
}
@Test
public void testCapabilityITALY() throws Exception {
- scriptTest("Capability", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Capability");
}
@Test
public void testLoginITALY() throws Exception {
- scriptTest("Login", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Login");
}
@Test
public void testValidAuthenticatedITALY() throws Exception {
- scriptTest("ValidAuthenticated", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ValidAuthenticated");
}
@Test
public void testValidSelectedITALY() throws Exception {
- scriptTest("ValidSelected", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ValidSelected");
}
@Test
public void testAuthenticateITALY() throws Exception {
- scriptTest("Authenticate", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Authenticate");
}
@Test
public void testNoopKOREA() throws Exception {
- scriptTest("Noop", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Noop");
}
@Test
public void testLogoutKOREA() throws Exception {
- scriptTest("Logout", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Logout");
}
@Test
public void testCapabilityKOREA() throws Exception {
- scriptTest("Capability", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Capability");
}
@Test
public void testLoginKOREA() throws Exception {
- scriptTest("Login", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Login");
}
@Test
public void testValidAuthenticatedKOREA() throws Exception {
- scriptTest("ValidAuthenticated", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ValidAuthenticated");
}
@Test
public void testValidSelectedKOREA() throws Exception {
- scriptTest("ValidSelected", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ValidSelected");
}
@Test
public void testAuthenticateKOREA() throws Exception {
- scriptTest("Authenticate", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Authenticate");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
index 99bc55e..02b0456 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/PartialFetch.java
@@ -24,75 +24,117 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class PartialFetch extends BaseSelectedState {
+public class PartialFetch implements ImapTestConstants {
@Inject
private static HostSystem system;
- public PartialFetch() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testBodyPartialFetchUS() throws Exception {
- scriptTest("BodyPartialFetch", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("BodyPartialFetch");
}
@Test
public void testBodyPartialFetchIT() throws Exception {
- scriptTest("BodyPartialFetch", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("BodyPartialFetch");
}
@Test
public void testBodyPartialFetchKO() throws Exception {
- scriptTest("BodyPartialFetch", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("BodyPartialFetch");
}
@Test
public void testTextPartialFetchUS() throws Exception {
- scriptTest("TextPartialFetch", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("TextPartialFetch");
}
@Test
public void testTextPartialFetchKO() throws Exception {
- scriptTest("TextPartialFetch", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("TextPartialFetch");
}
@Test
public void testTextPartialFetchIT() throws Exception {
- scriptTest("TextPartialFetch", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("TextPartialFetch");
}
@Test
public void testMimePartialFetchUS() throws Exception {
- scriptTest("MimePartialFetch", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("MimePartialFetch");
}
@Test
public void testMimePartialFetchIT() throws Exception {
- scriptTest("MimePartialFetch", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("MimePartialFetch");
}
@Test
public void testMimePartialFetchKO() throws Exception {
- scriptTest("MimePartialFetch", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("MimePartialFetch");
}
@Test
public void testHeaderPartialFetchUS() throws Exception {
- scriptTest("HeaderPartialFetch", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("HeaderPartialFetch");
}
@Test
public void testHeaderPartialFetchIT() throws Exception {
- scriptTest("HeaderPartialFetch", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("HeaderPartialFetch");
}
@Test
public void testHeaderPartialFetchKO() throws Exception {
- scriptTest("HeaderPartialFetch", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("HeaderPartialFetch");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
index e1ef008..34b35c2 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/QuotaTest.java
@@ -19,16 +19,21 @@
package org.apache.james.mpt.imapmailbox.suite;
+import java.util.Locale;
+
+import javax.inject.Inject;
+
import org.apache.james.mpt.api.ImapFeatures;
import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Assume;
+import org.junit.Before;
import org.junit.Test;
-import javax.inject.Inject;
-import java.util.Locale;
-
-public class QuotaTest extends BaseSelectedState {
+public class QuotaTest implements ImapTestConstants {
private static final int MAX_MESSAGE_QUOTA = 4096;
private static final long MAX_STORAGE_QUOTA = 5 * 1024L * 1024L * 1024L;
@@ -36,16 +41,30 @@ public class QuotaTest extends BaseSelectedState {
@Inject
private static ImapHostSystem system;
- public QuotaTest() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ Assume.assumeTrue(system.supports(ImapFeatures.Feature.QUOTA_SUPPORT));
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testQuotaScript() throws Exception {
- Assume.assumeTrue(system.supports(ImapFeatures.Feature.QUOTA_SUPPORT));
-
system.setQuotaLimits(MAX_MESSAGE_QUOTA, MAX_STORAGE_QUOTA);
-
- scriptTest("Quota", Locale.CANADA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.CANADA)
+ .run("Quota");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
index 12bb14b..517c3e9 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Rename.java
@@ -24,60 +24,96 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class Rename extends BaseSelectedState {
+public class Rename implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Rename() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testRenameUS() throws Exception {
- scriptTest("Rename", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Rename");
}
@Test
public void testRenameKOREA() throws Exception {
- scriptTest("Rename", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Rename");
}
@Test
public void testRenameITALY() throws Exception {
- scriptTest("Rename", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Rename");
}
@Test
public void testRenameHierarchyUS() throws Exception {
- scriptTest("RenameHierarchy", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("RenameHierarchy");
}
@Test
public void testRenameHierarchyKO() throws Exception {
- scriptTest("RenameHierarchy", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("RenameHierarchy");
}
@Test
public void testRenameHierarchyIT() throws Exception {
- scriptTest("RenameHierarchy", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("RenameHierarchy");
}
@Test
public void testRenameSelectedUS() throws Exception {
- scriptTest("RenameSelected", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("RenameSelected");
}
@Test
public void testRenameSelectedIT() throws Exception {
- scriptTest("RenameSelected", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("RenameSelected");
}
@Test
public void testRenameSelectedKO() throws Exception {
- scriptTest("RenameSelected", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("RenameSelected");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
index 6a5ba4b..22cb785 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
@@ -24,45 +24,73 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class Search extends BaseAuthenticatedState {
+public class Search implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Search() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testSearchAtomsUS() throws Exception {
- scriptTest("SearchAtoms", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("SearchAtoms");
}
@Test
public void testSearchAtomsITALY() throws Exception {
- scriptTest("SearchAtoms", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("SearchAtoms");
}
@Test
public void testSearchAtomsKOREA() throws Exception {
- scriptTest("SearchAtoms", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("SearchAtoms");
}
@Test
public void testSearchCombinationsUS() throws Exception {
- scriptTest("SearchCombinations", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("SearchCombinations");
}
@Test
public void testSearchCombinationsITALY() throws Exception {
- scriptTest("SearchCombinations", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("SearchCombinations");
}
@Test
public void testSearchCombinationsKOREA() throws Exception {
- scriptTest("SearchCombinations", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("SearchCombinations");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
index ae93fe6..0628c11 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Security.java
@@ -24,125 +24,185 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseImapProtocol;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class Security extends BaseImapProtocol {
+public class Security implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Security() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void accessingOtherPeopleNamespaceShouldBeDenied() throws Exception {
- scriptTest("SharedMailbox", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("SharedMailbox");
}
@Test
public void testLoginThreeStrikesUS() throws Exception {
- scriptTest("LoginThreeStrikes", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("LoginThreeStrikes");
}
@Test
public void testLoginThreeStrikesKOREA() throws Exception {
- scriptTest("LoginThreeStrikes", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("LoginThreeStrikes");
}
@Test
public void testLoginThreeStrikesITALY() throws Exception {
- scriptTest("LoginThreeStrikes", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("LoginThreeStrikes");
}
@Test
public void testBadTagUS() throws Exception {
- scriptTest("BadTag", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("BadTag");
}
@Test
public void testBadTagKOREA() throws Exception {
- scriptTest("BadTag", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("BadTag");
}
@Test
public void testBadTagITALY() throws Exception {
- scriptTest("BadTag", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("BadTag");
}
@Test
public void testNoTagUS() throws Exception {
- scriptTest("NoTag", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("NoTag");
}
@Test
public void testNoTagKOREA() throws Exception {
- scriptTest("NoTag", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("NoTag");
}
@Test
public void testNoTagITALY() throws Exception {
- scriptTest("NoTag", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("NoTag");
}
@Test
public void testIllegalTagUS() throws Exception {
- scriptTest("IllegalTag", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("IllegalTag");
}
@Test
public void testIllegalTagKOREA() throws Exception {
- scriptTest("IllegalTag", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("IllegalTag");
}
@Test
public void testIllegalTagITALY() throws Exception {
- scriptTest("IllegalTag", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("IllegalTag");
}
@Test
public void testJustTagUS() throws Exception {
- scriptTest("JustTag", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("JustTag");
}
@Test
public void testJustTagKOREA() throws Exception {
- scriptTest("JustTag", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("JustTag");
}
@Test
public void testJustTagITALY() throws Exception {
- scriptTest("JustTag", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("JustTag");
}
@Test
public void testNoCommandUS() throws Exception {
- scriptTest("NoCommand", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("NoCommand");
}
@Test
public void testNoCommandKOREA() throws Exception {
- scriptTest("NoCommand", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("NoCommand");
}
@Test
public void testNoCommandITALY() throws Exception {
- scriptTest("NoCommand", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("NoCommand");
}
@Test
public void testBogusCommandUS() throws Exception {
- scriptTest("BogusCommand", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("BogusCommand");
}
@Test
public void testBogusCommandKOREA() throws Exception {
- scriptTest("BogusCommand", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("BogusCommand");
}
@Test
public void testNoBogusITALY() throws Exception {
- scriptTest("BogusCommand", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("BogusCommand");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
index 9fe7217..411ef76 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Select.java
@@ -24,30 +24,52 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class Select extends BaseAuthenticatedState {
+public class Select implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Select() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testSelectUnseenUS() throws Exception {
- scriptTest("SelectUnseen", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("SelectUnseen");
}
@Test
public void testSelectUnseenKOREA() throws Exception {
- scriptTest("SelectUnseen", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("SelectUnseen");
}
@Test
public void testSelectUnseenITALY() throws Exception {
- scriptTest("SelectUnseen", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("SelectUnseen");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
index 1bddd69..5cdc63a 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
@@ -24,226 +24,327 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedInbox;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class SelectedInbox extends BaseSelectedInbox {
+public class SelectedInbox implements ImapTestConstants {
@Inject
private static HostSystem system;
- public SelectedInbox() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.selectInbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testValidNonAuthenticatedUS() throws Exception {
- scriptTest("ValidNonAuthenticated", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ValidNonAuthenticated");
}
@Test
public void testCapabilityUS() throws Exception {
- scriptTest("Capability", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Capability");
}
@Test
public void testNoopUS() throws Exception {
- scriptTest("Noop", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Noop");
}
@Test
public void testLogoutUS() throws Exception {
- scriptTest("Logout", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Logout");
}
@Test
public void testCreateUS() throws Exception {
- scriptTest("Create", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Create");
}
@Test
public void testExamineEmptyUS() throws Exception {
- scriptTest("ExamineEmpty", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ExamineEmpty");
}
@Test
public void testSelectEmptyUS() throws Exception {
- scriptTest("SelectEmpty", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("SelectEmpty");
}
@Test
public void testListNamespaceUS() throws Exception {
- scriptTest("ListNamespace", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ListNamespace");
}
@Test
public void testListMailboxesUS() throws Exception {
- scriptTest("ListMailboxes", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ListMailboxes");
}
@Test
public void testStatusUS() throws Exception {
- scriptTest("Status", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Status");
}
@Test
public void testStringArgsUS() throws Exception {
- scriptTest("StringArgs", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("StringArgs");
}
@Test
public void testSubscribeUS() throws Exception {
- scriptTest("Subscribe", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Subscribe");
}
@Test
public void testAppendUS() throws Exception {
- scriptTest("Append", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Append");
}
@Test
public void testDeleteUS() throws Exception {
- scriptTest("Delete", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Delete");
}
@Test
public void testValidNonAuthenticatedITALY() throws Exception {
- scriptTest("ValidNonAuthenticated", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ValidNonAuthenticated");
}
@Test
public void testCapabilityITALY() throws Exception {
- scriptTest("Capability", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Capability");
}
@Test
public void testNoopITALY() throws Exception {
- scriptTest("Noop", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Noop");
}
@Test
public void testLogoutITALY() throws Exception {
- scriptTest("Logout", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Logout");
}
@Test
public void testCreateITALY() throws Exception {
- scriptTest("Create", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Create");
}
@Test
public void testExamineEmptyITALY() throws Exception {
- scriptTest("ExamineEmpty", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ExamineEmpty");
}
@Test
public void testSelectEmptyITALY() throws Exception {
- scriptTest("SelectEmpty", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("SelectEmpty");
}
@Test
public void testListNamespaceITALY() throws Exception {
- scriptTest("ListNamespace", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ListNamespace");
}
@Test
public void testListMailboxesITALY() throws Exception {
- scriptTest("ListMailboxes", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ListMailboxes");
}
@Test
public void testStatusITALY() throws Exception {
- scriptTest("Status", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Status");
}
@Test
public void testStringArgsITALY() throws Exception {
- scriptTest("StringArgs", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("StringArgs");
}
@Test
public void testSubscribeITALY() throws Exception {
- scriptTest("Subscribe", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Subscribe");
}
@Test
public void testAppendITALY() throws Exception {
- scriptTest("Append", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Append");
}
@Test
public void testDeleteITALY() throws Exception {
- scriptTest("Delete", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Delete");
}
@Test
public void testValidNonAuthenticatedKOREA() throws Exception {
- scriptTest("ValidNonAuthenticated", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ValidNonAuthenticated");
}
@Test
public void testCapabilityKOREA() throws Exception {
- scriptTest("Capability", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Capability");
}
@Test
public void testNoopKOREA() throws Exception {
- scriptTest("Noop", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Noop");
}
@Test
public void testLogoutKOREA() throws Exception {
- scriptTest("Logout", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Logout");
}
@Test
public void testCreateKOREA() throws Exception {
- scriptTest("Create", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Create");
}
@Test
public void testExamineEmptyKOREA() throws Exception {
- scriptTest("ExamineEmpty", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ExamineEmpty");
}
@Test
public void testSelectEmptyKOREA() throws Exception {
- scriptTest("SelectEmpty", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("SelectEmpty");
}
@Test
public void testListNamespaceKOREA() throws Exception {
- scriptTest("ListNamespace", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ListNamespace");
}
@Test
public void testListMailboxesKOREA() throws Exception {
- scriptTest("ListMailboxes", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ListMailboxes");
}
@Test
public void testStatusKOREA() throws Exception {
- scriptTest("Status", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Status");
}
@Test
public void testStringArgsKOREA() throws Exception {
- scriptTest("StringArgs", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("StringArgs");
}
@Test
public void testSubscribeKOREA() throws Exception {
- scriptTest("Subscribe", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Subscribe");
}
@Test
public void testAppendKOREA() throws Exception {
- scriptTest("Append", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Append");
}
@Test
public void testDeleteKOREA() throws Exception {
- scriptTest("Delete", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Delete");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
index 5ac6172..bc30f44 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
@@ -24,165 +24,243 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class SelectedState extends BaseSelectedState {
+public class SelectedState implements ImapTestConstants {
@Inject
private static HostSystem system;
- public SelectedState() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testCheckUS() throws Exception {
- scriptTest("Check", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Check");
}
@Test
public void testExpungeUS() throws Exception {
- scriptTest("Expunge", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Expunge");
}
@Test
public void testSearchUS() throws Exception {
- scriptTest("Search", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Search");
}
@Test
public void testFetchSingleMessageUS() throws Exception {
- scriptTest("FetchSingleMessage", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchSingleMessage");
}
@Test
public void testFetchMultipleMessagesUS() throws Exception {
- scriptTest("FetchMultipleMessages", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchMultipleMessages");
}
@Test
public void testFetchPeekUS() throws Exception {
- scriptTest("FetchPeek", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("FetchPeek");
}
@Test
public void testStoreUS() throws Exception {
- scriptTest("Store", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Store");
}
@Test
public void testCopyUS() throws Exception {
- scriptTest("Copy", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Copy");
}
@Test
public void testUidUS() throws Exception {
- scriptTest("Uid", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Uid");
}
@Test
public void testCheckITALY() throws Exception {
- scriptTest("Check", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Check");
}
@Test
public void testExpungeITALY() throws Exception {
- scriptTest("Expunge", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Expunge");
}
@Test
public void testSearchITALY() throws Exception {
- scriptTest("Search", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Search");
}
@Test
public void testFetchSingleMessageITALY() throws Exception {
- scriptTest("FetchSingleMessage", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchSingleMessage");
}
@Test
public void testFetchMultipleMessagesITALY() throws Exception {
- scriptTest("FetchMultipleMessages", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchMultipleMessages");
}
@Test
public void testFetchPeekITALY() throws Exception {
- scriptTest("FetchPeek", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("FetchPeek");
}
@Test
public void testStoreITALY() throws Exception {
- scriptTest("Store", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Store");
}
@Test
public void testCopyITALY() throws Exception {
- scriptTest("Copy", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Copy");
}
@Test
public void testUidITALY() throws Exception {
- scriptTest("Uid", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Uid");
}
@Test
public void testCheckKOREA() throws Exception {
- scriptTest("Check", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Check");
}
@Test
public void testExpungeKOREA() throws Exception {
- scriptTest("Expunge", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Expunge");
}
@Test
public void testSearchKOREA() throws Exception {
- scriptTest("Search", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Search");
}
@Test
public void testFetchSingleMessageKOREA() throws Exception {
- scriptTest("FetchSingleMessage", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchSingleMessage");
}
@Test
public void testFetchMultipleMessagesKOREA() throws Exception {
- scriptTest("FetchMultipleMessages", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchMultipleMessages");
}
@Test
public void testFetchPeekKOREA() throws Exception {
- scriptTest("FetchPeek", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("FetchPeek");
}
@Test
public void testStoreKOREA() throws Exception {
- scriptTest("Store", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Store");
}
@Test
public void testCopyKOREA() throws Exception {
- scriptTest("Copy", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Copy");
}
@Test
public void testUidKOREA() throws Exception {
- scriptTest("Uid", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Uid");
}
@Test
public void testNamespaceUS() throws Exception {
- scriptTest("Namespace", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("Namespace");
}
@Test
public void testNamespaceITALY() throws Exception {
- scriptTest("Namespace", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Namespace");
}
@Test
public void testNamespaceKOREA() throws Exception {
- scriptTest("Namespace", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Namespace");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[04/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
new file mode 100644
index 0000000..1dc4571
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileNoopTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.NoopTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileNoopTest extends NoopTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
new file mode 100644
index 0000000..50a72bc
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FilePutScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.PutScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FilePutScriptTest extends PutScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileRenameScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileRenameScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileRenameScriptTest.java
new file mode 100644
index 0000000..35bf256
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileRenameScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.RenameScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileRenameScriptTest extends RenameScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileSetActiveTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileSetActiveTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileSetActiveTest.java
new file mode 100644
index 0000000..3ec799a
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileSetActiveTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.SetActiveTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileSetActiveTest extends SetActiveTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileStartTlsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileStartTlsTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileStartTlsTest.java
new file mode 100644
index 0000000..d37365f
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileStartTlsTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.StartTlsTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileStartTlsTest extends StartTlsTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileUnauthenticatedTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileUnauthenticatedTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileUnauthenticatedTest.java
new file mode 100644
index 0000000..1f6eeab
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileUnauthenticatedTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.UnauthenticatedTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileUnauthenticatedTest extends UnauthenticatedTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/ManageSieveFileTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/ManageSieveFileTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/ManageSieveFileTest.java
deleted file mode 100644
index 9b98838..0000000
--- a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/ManageSieveFileTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- * 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.managesieve.file;
-
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.testsuite.AuthenticateTest;
-import org.apache.james.mpt.testsuite.CapabilityTest;
-import org.apache.james.mpt.testsuite.CheckScriptTest;
-import org.apache.james.mpt.testsuite.DeleteScriptTest;
-import org.apache.james.mpt.testsuite.GetScriptTest;
-import org.apache.james.mpt.testsuite.HaveSpaceTest;
-import org.apache.james.mpt.testsuite.ListScriptsTest;
-import org.apache.james.mpt.testsuite.LogoutTest;
-import org.apache.james.mpt.testsuite.NoopTest;
-import org.apache.james.mpt.testsuite.PutScriptTest;
-import org.apache.james.mpt.testsuite.RenameScriptTest;
-import org.apache.james.mpt.testsuite.SetActiveTest;
-import org.apache.james.mpt.testsuite.StartTlsTest;
-import org.apache.james.mpt.testsuite.UnauthenticatedTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@GuiceModules({ FileModule.class })
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
- NoopTest.class,
- UnauthenticatedTest.class,
- LogoutTest.class,
- AuthenticateTest.class,
- StartTlsTest.class,
- CapabilityTest.class,
- HaveSpaceTest.class,
- PutScriptTest.class,
- SetActiveTest.class,
- GetScriptTest.class,
- DeleteScriptTest.class,
- RenameScriptTest.class,
- CheckScriptTest.class,
- ListScriptsTest.class
-})
-public class ManageSieveFileTest {
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/cassandra/pom.xml b/mpt/impl/smtp/cassandra/pom.xml
index 48b9cb1..caa3fd2 100644
--- a/mpt/impl/smtp/cassandra/pom.xml
+++ b/mpt/impl/smtp/cassandra/pom.xml
@@ -177,10 +177,6 @@
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
- <artifactId>apache-james-mpt-onami-test</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.james</groupId>
<artifactId>james-server-cassandra-guice</artifactId>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/CassandraForwardSmtpTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/CassandraForwardSmtpTest.java b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/CassandraForwardSmtpTest.java
new file mode 100644
index 0000000..0cda129
--- /dev/null
+++ b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/CassandraForwardSmtpTest.java
@@ -0,0 +1,49 @@
+/****************************************************************
+ * 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.smtp;
+
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraForwardSmtpTest extends ForwardSmtpTest {
+
+ private SmtpHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new SmtpTestModule(SmtpTestModule.Port.SMTP));
+ system = injector.getInstance(SmtpHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected SmtpHostSystem createSmtpHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/CassandraSmtpStarttlsCommandTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/CassandraSmtpStarttlsCommandTest.java b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/CassandraSmtpStarttlsCommandTest.java
new file mode 100644
index 0000000..d807faf
--- /dev/null
+++ b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/CassandraSmtpStarttlsCommandTest.java
@@ -0,0 +1,49 @@
+/****************************************************************
+ * 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.smtp;
+
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraSmtpStarttlsCommandTest extends SmtpStarttlsCommandTest {
+
+ private SmtpHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new SmtpTestModule(SmtpTestModule.Port.SMTP_START_TTLS));
+ system = injector.getInstance(SmtpHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected SmtpHostSystem createSmtpHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTest.java b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTest.java
deleted file mode 100644
index 5a7beea..0000000
--- a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- * 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.smtp;
-
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
- ForwardSmtpTest.class
-})
-@GuiceModules({ SmtpTestModule.class })
-public class SmtpTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTestModule.java b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTestModule.java
index 923c854..e86db9d 100644
--- a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTestModule.java
+++ b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/SmtpTestModule.java
@@ -24,9 +24,26 @@ import com.google.inject.AbstractModule;
public class SmtpTestModule extends AbstractModule {
+ enum Port {
+ SMTP(1025),
+ SMTP_START_TTLS(1587);
+
+ private int port;
+
+ Port(int port) {
+ this.port = port;
+ }
+ }
+
+ private Port smtpPort;
+
+ public SmtpTestModule(Port smtpPort) {
+ this.smtpPort = smtpPort;
+ }
+
@Override
protected void configure() {
- bind(SmtpHostSystem.class).toInstance(new CassandraJamesSmtpHostSystem(1025));
+ bind(SmtpHostSystem.class).toInstance(new CassandraJamesSmtpHostSystem(smtpPort.port));
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/StarttlsSmtpTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/StarttlsSmtpTest.java b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/StarttlsSmtpTest.java
deleted file mode 100644
index 376579f..0000000
--- a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/StarttlsSmtpTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- * 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.smtp;
-
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
- SmtpStarttlsCommandTest.class
-})
-@GuiceModules({ StarttlsSmtpTestModule.class })
-public class StarttlsSmtpTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/StarttlsSmtpTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/StarttlsSmtpTestModule.java b/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/StarttlsSmtpTestModule.java
deleted file mode 100644
index 88b44d5..0000000
--- a/mpt/impl/smtp/cassandra/src/test/java/org/apache/james/mpt/smtp/StarttlsSmtpTestModule.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/****************************************************************
- * 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.smtp;
-
-import org.apache.james.mpt.smtp.host.CassandraJamesSmtpHostSystem;
-
-import com.google.inject.AbstractModule;
-
-public class StarttlsSmtpTestModule extends AbstractModule {
-
- @Override
- protected void configure() {
- bind(SmtpHostSystem.class).toInstance(new CassandraJamesSmtpHostSystem(1587));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
index c6e8814..fdc47e7 100644
--- a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
+++ b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
@@ -26,8 +26,6 @@ import static org.hamcrest.Matchers.equalTo;
import java.net.InetAddress;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.apache.james.util.streams.SwarmGenericContainer;
import org.junit.Before;
@@ -42,7 +40,7 @@ import com.jayway.restassured.RestAssured;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.http.ContentType;
-public class ForwardSmtpTest {
+public abstract class ForwardSmtpTest {
public static final String USER = "bob";
public static final String DOMAIN = "mydomain.tld";
@@ -56,20 +54,21 @@ public class ForwardSmtpTest {
@Rule
public final RuleChain chain = RuleChain.outerRule(folder).around(fakeSmtp);
- @Inject
- private static SmtpHostSystem hostSystem;
-
- private SimpleScriptedTestProtocol scriptedTest;
+ protected abstract SmtpHostSystem createSmtpHostSystem();
- public ForwardSmtpTest() throws Exception {
+ private SmtpHostSystem hostSystem;
+ private SimpleScriptedTestProtocol scriptedTest;
+
+ @Before
+ public void setUp() throws Exception {
+ hostSystem = createSmtpHostSystem();
+
scriptedTest = new SimpleScriptedTestProtocol("/org/apache/james/smtp/scripts/", hostSystem)
.withLocale(Locale.US)
.withUser(USER_AT_DOMAIN, PASSWORD);
- }
- @Before
- public void setUp() throws Exception {
InetAddress containerIp = InetAddresses.forString(fakeSmtp.getIp());
+
hostSystem.getInMemoryDnsService()
.registerRecord("yopmail.com", containerIp, "yopmail.com");
hostSystem.addAddressMapping(USER, DOMAIN, "ray@yopmail.com");
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java
index e667886..efc3a28 100644
--- a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java
+++ b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java
@@ -20,15 +20,14 @@ package org.apache.james.mpt.smtp;
import java.util.Locale;
-import javax.inject.Inject;
-
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.RuleChain;
import org.junit.rules.TemporaryFolder;
-public class SmtpStarttlsCommandTest {
+public abstract class SmtpStarttlsCommandTest {
public static final String USER = "bob";
public static final String DOMAIN = "mydomain.tld";
@@ -40,12 +39,14 @@ public class SmtpStarttlsCommandTest {
@Rule
public final RuleChain chain = RuleChain.outerRule(folder);
- @Inject
- private static SmtpHostSystem hostSystem;
+ protected abstract SmtpHostSystem createSmtpHostSystem();
+ private SmtpHostSystem hostSystem;
private SimpleScriptedTestProtocol scriptedTest;
- public SmtpStarttlsCommandTest() throws Exception {
+ @Before
+ public void setUp() throws Exception {
+ hostSystem = createSmtpHostSystem();
String scriptDir = "/org/apache/james/smtp/scripts/";
scriptedTest = new SimpleScriptedTestProtocol(scriptDir, hostSystem)
.withLocale(Locale.US)
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/onami-test/pom.xml b/mpt/onami-test/pom.xml
deleted file mode 100644
index 46a2856..0000000
--- a/mpt/onami-test/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>apache-james-mpt</artifactId>
- <groupId>org.apache.james</groupId>
- <version>3.1.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>apache-james-mpt-onami-test</artifactId>
- <packaging>jar</packaging>
-
- <name>Apache James :: MPT :: Onami-test</name>
- <description>MPT tooling from Onami project</description>
-
- <dependencies>
- <dependency>
- <groupId>com.google.inject</groupId>
- <artifactId>guice</artifactId>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.easymock</groupId>
- <artifactId>easymock</artifactId>
- <version>3.2</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>16.0.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>1.9.5</version>
- <scope>provided</scope>
- <optional>true</optional>
- </dependency>
-
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/GuiceMockModule.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/GuiceMockModule.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/GuiceMockModule.java
deleted file mode 100644
index b88aa67..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/GuiceMockModule.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import static com.google.common.base.Preconditions.checkState;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.james.mpt.onami.test.annotation.Mock;
-
-import com.google.common.collect.HashMultimap;
-import com.google.common.collect.Multimap;
-import com.google.inject.AbstractModule;
-import com.google.inject.TypeLiteral;
-import com.google.inject.name.Names;
-
-/**
- * <p>
- * This class creates the binding for all mock objects found.
- * </p>
- * <p>
- * Method {@link GuiceMockModule#configure()} creates a binding for each {@link Mock} annotation found. The binding will
- * be created <b>if and only if</b> there is no types conflict between {@link Mock} caught.
- * <p>
- * <p>
- * <b>A type conflict</b> is detected if two or more field are annotated with the same {@link Mock} and no different
- * {@link Mock#annotatedWith} parameter are specified, or two o more equals {@link Mock#annotatedWith} parameter are
- * specified for the same type field.
- * </p>
- * <p>
- * If a conflict is detected the binding will not create for the conflicted type, moreover the field will be injected
- * into the test class.
- * </p>
- */
-public class GuiceMockModule extends AbstractModule {
-
- private static final Logger LOGGER = Logger.getLogger(GuiceMockModule.class.getName());
-
- final Map<Field, Object> mockedFields;
-
- /**
- * Costructor.
- *
- * @param mockedFields the map of mock fileds.
- */
-
- public GuiceMockModule(final Map<Field, Object> mockedFields) {
- this.mockedFields = mockedFields;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- protected void configure() {
- final Multimap<Type, Field> fieldsByType = HashMultimap.create();
-
- for (final Entry<Field, Object> entry : this.mockedFields.entrySet()) {
- fieldsByType.put(entry.getKey().getGenericType(), entry.getKey());
- }
-
- for (final Type type : fieldsByType.keySet()) {
- final Collection<Field> fields = fieldsByType.get(type);
-
- boolean isTypeConflicts = false;
- if (fields.size() != 1) {
- isTypeConflicts = checkTypeConflict(fields);
- }
-
- checkState(!isTypeConflicts, " Found multiple annotation @%s for type: %s; binding skipped!.",
- Mock.class.getSimpleName(), type);
- for (final Field field : fields) {
- @SuppressWarnings("rawtypes")
- final TypeLiteral literal = TypeLiteral.get(type);
- final Mock annoBy = field.getAnnotation(Mock.class);
- final Object mock = this.mockedFields.get(field);
- if (annoBy.annotatedWith() != Mock.NoAnnotation.class) {
- bind(literal).annotatedWith(annoBy.annotatedWith()).toInstance(mock);
- } else if (!"".equals(annoBy.namedWith())) {
- bind(literal).annotatedWith(Names.named(annoBy.namedWith())).toInstance(mock);
- } else {
- bind(literal).toInstance(mock);
- }
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Created binding for: " + type + " " + annoBy);
- }
- }
- }
- }
-
- /**
- * @param fields
- * @return
- */
- private boolean checkTypeConflict(Collection<Field> fields) {
- final List<Class<?>> listAnnotatedType = new ArrayList<Class<?>>();
- final List<String> listNamedType = new ArrayList<String>();
- int numOfSimpleType = 0;
-
- for (Field field : fields) {
- final Mock annoBy = field.getAnnotation(Mock.class);
-
- if (annoBy.annotatedWith() == Mock.NoAnnotation.class && "".equals(annoBy.namedWith())) {
- numOfSimpleType++;
- }
- if (numOfSimpleType > 1) {
- LOGGER.finer("Found multiple simple type");
- return true;
- }
-
- if (annoBy.annotatedWith() != Mock.NoAnnotation.class) {
- if (!listAnnotatedType.contains(annoBy.annotatedWith())) {
- listAnnotatedType.add(annoBy.annotatedWith());
- } else {
- // found two fields with same annotation
- LOGGER.finer("Found multiple annotatedBy type");
- return true;
- }
- }
-
- if (!"".equals(annoBy.namedWith())) {
- if (!listNamedType.contains(annoBy.namedWith())) {
- listNamedType.add(annoBy.namedWith());
- } else {
- // found two fields with same named annotation
- LOGGER.finer("Found multiple namedWith type");
- return true;
- }
- }
- }
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/MockEngineFactory.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/MockEngineFactory.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/MockEngineFactory.java
deleted file mode 100644
index 37d64ca..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/MockEngineFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import org.apache.james.mpt.onami.test.annotation.MockType;
-import org.apache.james.mpt.onami.test.mock.MockEngine;
-import org.apache.james.mpt.onami.test.mock.framework.EasyMockFramework;
-import org.apache.james.mpt.onami.test.mock.framework.MockitoFramework;
-
-/**
- * Factory class to create the mock framework.
- *
- * @see org.apache.onami.test.annotation.MockFramework
- */
-final class MockEngineFactory {
-
- /**
- * Hidden constructor, this class must not be instantiated directly.
- */
- private MockEngineFactory() {
- // do nothing
- }
-
- /**
- * Mock factory constructor. <br>
- * Supported framewors: <li> {@link MockType}.EASY_MOCK <li> {@link MockType}.MOCKITO <br>
- *
- * @param type of mock framework to create.
- * @return An instance of mock framework.
- * @see MockType
- */
- public static MockEngine getMockEngine(MockType type) {
- switch (type) {
- case EASY_MOCK:
- return new EasyMockFramework();
-
- case MOCKITO:
- return new MockitoFramework();
-
- default:
- throw new IllegalArgumentException("Unrecognized MockType '" + type.name() + "'");
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/OnamiRunner.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/OnamiRunner.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/OnamiRunner.java
deleted file mode 100644
index 78ae0a5..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/OnamiRunner.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.annotation.GuiceProvidedModules;
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.annotation.MockFramework;
-import org.apache.james.mpt.onami.test.annotation.MockType;
-import org.apache.james.mpt.onami.test.guice.MockTypeListener;
-import org.apache.james.mpt.onami.test.handler.GuiceInjectableClassHandler;
-import org.apache.james.mpt.onami.test.handler.GuiceModuleHandler;
-import org.apache.james.mpt.onami.test.handler.GuiceProvidedModuleHandler;
-import org.apache.james.mpt.onami.test.handler.MockFrameworkHandler;
-import org.apache.james.mpt.onami.test.handler.MockHandler;
-import org.apache.james.mpt.onami.test.mock.MockEngine;
-import org.apache.james.mpt.onami.test.reflection.ClassVisitor;
-import org.apache.james.mpt.onami.test.reflection.HandleException;
-import org.junit.runner.notification.RunNotifier;
-import org.junit.runners.BlockJUnit4ClassRunner;
-import org.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.InitializationError;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.matcher.Matchers;
-import com.google.inject.util.Modules;
-
-/**
- * <p>
- * It's a {@link BlockJUnit4ClassRunner} runner.
- * </p>
- * <p>
- * This class creates a Google Guice {@link Injector} configured by {@link GuiceModules} annotation (only fr modules
- * with default constructor) and {@link GuiceProvidedModules} annotation and {@link Mock}.
- * </p>
- * <p>
- * <b>Example #1:</b> <br>
- * <p>
- * <pre>
- *
- * @org.junit.runner.RunWith( OnamiRunner.class )
- * @GuiceModules( SimpleModule.class )
- * public class AcmeTestCase
- * {
- *
- * @GuiceProvidedModules
- * static public Module getProperties()
- * {
- * ...
- * return Modules.combine(new ComplexModule( loadProperies() ), ... );
- * }
- *
- * </pre>
- * <p>
- * </p>
- * <p>
- * <b>Example #2:</b> <br>
- * <p>
- * <pre>
- *
- * @org.junit.runner.RunWith( OnamiRunner.class )
- * public class AcmeTestCase
- * extends com.google.inject.AbstractModule
- * {
- *
- * public void configure()
- * {
- * // Configure your proper modules
- * ...
- * bind( Service.class ).annotatedWith( TestAnnotation.class ).to( ServiceTestImpl.class );
- * ...
- * }
- *
- * @Mock
- * private AnotherService serviceMock;
- *
- * @Inject
- * private Service serviceTest;
- *
- * @org.junit.Test
- * public void test()
- * {
- * assertNotNull( serviceMock );
- * assertNotNull( serviceTest );
- * }
- * </pre>
- * <p>
- * </p>
- *
- * @see GuiceMockModule
- */
-public class OnamiRunner extends BlockJUnit4ClassRunner {
-
- private static final Logger LOGGER = Logger.getLogger(OnamiRunner.class.getName());
-
- private Injector injector;
-
- private final List<Module> allModules;
-
- private final Map<Field, Object> mocked = new HashMap<Field, Object>(1);
-
- private MockType mockFramework = MockType.EASY_MOCK;
-
- /**
- * OnamiRunner constructor to create the core JUnice class.
- *
- * @param klass The test case class to run.
- * @throws org.junit.runners.model.InitializationError if any error occurs.
- * @see org.junit.runner.RunWith
- */
- public OnamiRunner(Class<?> klass)
- throws InitializationError {
- super(klass);
-
- try {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("Inizializing injector for test class: " + klass.getName());
- }
-
- this.allModules = inizializeInjector(klass);
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("done...");
- }
- } catch (Exception e) {
- final List<Throwable> throwables = new LinkedList<Throwable>();
- throwables.add(e);
- throw new InitializationError(throwables);
- }
- }
-
- /**
- * OnamiRunner constructor to create the runner needed
- * by the OnamiSuite class.
- *
- * @param suite The suite test case class to run.
- * @param test The test case class to run.
- * @throws org.junit.runners.model.InitializationError if any error occurs.
- * @see org.junit.runner.RunWith
- */
- public OnamiRunner(Class<?> suite, Class<?> test)
- throws InitializationError {
- super(test);
-
- try {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("Inizializing injector for test class: " + test.getName());
- }
-
- this.allModules = inizializeInjector(suite, test);
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("done...");
- }
- } catch (Exception e) {
- final List<Throwable> throwables = new LinkedList<Throwable>();
- throwables.add(e);
- throw new InitializationError(throwables);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void run(final RunNotifier notifier) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" ### Run test case: " + getTestClass().getJavaClass() + " ### ");
- LOGGER.finer(" #### Creating injector ####");
- }
-
- this.injector = createInjector(allModules);
- super.run(notifier);
- this.flush();
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" ### End test case: " + getTestClass().getJavaClass().getName() + " ### ");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- private void flush() {
- this.injector = null;
- this.allModules.clear();
- this.mocked.clear();
- }
-
- @Override
- protected void runChild(FrameworkMethod method, RunNotifier notifier) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" +++ invoke test method: " + method.getName() + " +++ ");
- }
-
- super.runChild(method, notifier);
- resetAllResetAfterMocks();
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" --- end test method: " + method.getName() + " --- ");
- }
- }
-
- /**
- * Creates test instance via Google-Guice to inject all not-static dependencies.
- *
- * @return The instance of the test case.
- * @throws Exception when an error occurs.
- */
- @Override
- protected Object createTest()
- throws Exception {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Create and inject test class: " + getTestClass().getJavaClass());
- }
- return this.injector.getInstance(getTestClass().getJavaClass());
- }
-
- /**
- * Shortcut to create the Injector given a list of Modules.
- *
- * @param modules the list of modules have to be load
- * @return an Injector instance built using the input Module list
- */
- protected Injector createInjector(List<Module> modules) {
- return Guice.createInjector(modules);
- }
-
- /**
- * This method collects modules from {@link GuiceModules}, {@link GuiceProvidedModules}, {@link Mock}
- * and {@ OnamiSuite}.
- *
- * @param <T> whatever input type is accepted
- * @param suite the input suite to be analyzed
- * @param test the input class has to be analyzed
- * @return a List of Guice Modules built after input class analysis.
- * @throws IllegalAccessException when a n error occurs.
- * @throws InstantiationException when a n error occurs.
- * @throws HandleException when a n error occurs.
- */
- protected <T> List<Module> inizializeInjector(Class<?> suite, Class<T> test)
- throws HandleException, InstantiationException, IllegalAccessException {
- final List<Module> modules = inizializeInjector(test);
- Module m = visitClass(suite);
- if (m != null) {
- modules.add(m);
- }
- return modules;
- }
-
- /**
- * This method collects modules from {@link GuiceModules}, {@link GuiceProvidedModules}, {@link Mock}.
- *
- * @param <T> whatever input type is accepted
- * @param clazz the input class has to be analyzed
- * @return a List of Guice Modules built after input class analysis.
- * @throws IllegalAccessException when a n error occurs.
- * @throws InstantiationException when a n error occurs.
- * @throws HandleException when a n error occurs.
- */
- protected <T> List<Module> inizializeInjector(Class<T> clazz)
- throws HandleException, InstantiationException, IllegalAccessException {
- final List<Module> modules = new ArrayList<Module>();
- Module m = visitClass(clazz);
- if (m != null) {
- modules.add(m);
- }
- return modules;
- }
-
- private void resetAllResetAfterMocks() {
- for (Entry<Field, Object> entry : mocked.entrySet()) {
- final Mock mockAnnotation = entry.getKey().getAnnotation(Mock.class);
- if (mockAnnotation.resetAfter()) {
- MockEngine mockEngine = MockEngineFactory.getMockEngine(mockFramework);
- mockEngine.resetMock(entry.getValue());
- }
- }
- }
-
- /**
- * @throws HandleException
- * @throws IllegalAccessException
- * @throws InstantiationException
- */
- private <T> Module visitClass(final Class<T> clazz)
- throws HandleException, InstantiationException, IllegalAccessException {
- try {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Start introspecting class: " + clazz.getName());
- }
- final List<Module> allModules = new ArrayList<Module>();
-
- // Setup the handlers
- final GuiceProvidedModuleHandler guiceProvidedModuleHandler = new GuiceProvidedModuleHandler();
- final GuiceModuleHandler guiceModuleHandler = new GuiceModuleHandler();
- final GuiceInjectableClassHandler<Inject> guiceInjectableClassHandler = new GuiceInjectableClassHandler<com.google.inject.Inject>();
- final GuiceInjectableClassHandler<javax.inject.Inject> jsr330InjectableClassHandler = new GuiceInjectableClassHandler<javax.inject.Inject>();
-
- final MockHandler mockHandler = new MockHandler();
- final MockFrameworkHandler mockFrameworkHandler = new MockFrameworkHandler();
-
- // Visit class and super-classes
- new ClassVisitor()
- .registerHandler(GuiceProvidedModules.class, guiceProvidedModuleHandler)
- .registerHandler(GuiceModules.class, guiceModuleHandler)
- .registerHandler(Mock.class, mockHandler)
- .registerHandler(MockFramework.class, mockFrameworkHandler)
- .registerHandler(com.google.inject.Inject.class, guiceInjectableClassHandler)
- .registerHandler(javax.inject.Inject.class, jsr330InjectableClassHandler)
- .visit(clazz);
-
- // Retrieve mock framework
- if (mockFrameworkHandler.getMockType() != null) {
- this.mockFramework = mockFrameworkHandler.getMockType();
- }
-
- // retrieve the modules founded
- allModules.addAll(guiceProvidedModuleHandler.getModules());
- allModules.addAll(guiceModuleHandler.getModules());
- MockEngine engine = MockEngineFactory.getMockEngine(this.mockFramework);
- this.mocked.putAll(mockHandler.getMockedObject(engine));
- if (!this.mocked.isEmpty()) {
- // Replace all real module binding with Mocked moduled.
- Module m = Modules.override(allModules).with(new GuiceMockModule(this.mocked));
- allModules.clear();
- allModules.add(m);
- }
-
- // Add only clasess that have got the Inject annotation
- final Class<?>[] guiceInjectableClasses = guiceInjectableClassHandler.getClasses();
- final Class<?>[] jsr330InjectableClasses = jsr330InjectableClassHandler.getClasses();
-
- final AbstractModule statcInjector = new AbstractModule() {
- @Override
- protected void configure() {
- // inject all STATIC dependencies
- if (guiceInjectableClasses.length != 0) {
- requestStaticInjection(guiceInjectableClasses);
- }
-
- if (jsr330InjectableClasses.length != 0) {
- requestStaticInjection(jsr330InjectableClasses);
- }
-
-
- }
- };
- if (guiceInjectableClasses.length != 0 || jsr330InjectableClasses.length != 0) {
- allModules.add(statcInjector);
- }
-
- // Check if the class is itself a Google Module.
- if (Module.class.isAssignableFrom(getTestClass().getJavaClass())) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" creating module from test class " + getTestClass().getJavaClass());
- }
- final Module classModule = (Module) getTestClass().getJavaClass().newInstance();
- allModules.add(classModule);
- }
-
- // create MockTypeListenerModule
- if (this.mocked.size() != 0) {
- final AbstractModule mockTypeListenerModule = new AbstractModule() {
- @Override
- protected void configure() {
- bindListener(Matchers.any(), new MockTypeListener(mocked));
- }
- };
-
- // BEGIN patch for issue: google-guice: #452
- for (Entry<Field, Object> entry : mocked.entrySet()) {
- final Field field = entry.getKey();
- final Object mock = entry.getValue();
- if (Modifier.isStatic(field.getModifiers())) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" inject static mock field: " + field.getName());
- }
-
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
-
- public Void run() {
- field.setAccessible(true);
- return null;
- }
-
- });
- field.set(field.getDeclaringClass(), mock);
- }
- }
- // END patch for issue: google-guice: #452
-
- allModules.add(mockTypeListenerModule);
- }
-
- if (allModules.size() != 0) {
- if (LOGGER.isLoggable(Level.FINER)) {
- StringBuilder builder = new StringBuilder();
- builder.append(" Collected modules: ");
- builder.append("\n");
- for (Module module : allModules) {
- builder.append(" ").append(module);
- builder.append("\n");
- }
- LOGGER.finer(builder.toString());
- }
- return Modules.combine(allModules);
- }
- return null;
- } finally {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" ...done");
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/OnamiSuite.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/OnamiSuite.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/OnamiSuite.java
deleted file mode 100644
index 977f8ff..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/OnamiSuite.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/****************************************************************
- * 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.onami.test;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.onami.test.annotation.GuiceProvidedModules;
-import org.apache.james.mpt.onami.test.annotation.Mock;
-import org.apache.james.mpt.onami.test.annotation.MockFramework;
-import org.apache.james.mpt.onami.test.annotation.MockType;
-import org.apache.james.mpt.onami.test.guice.MockTypeListener;
-import org.apache.james.mpt.onami.test.handler.GuiceInjectableClassHandler;
-import org.apache.james.mpt.onami.test.handler.GuiceModuleHandler;
-import org.apache.james.mpt.onami.test.handler.GuiceProvidedModuleHandler;
-import org.apache.james.mpt.onami.test.handler.MockFrameworkHandler;
-import org.apache.james.mpt.onami.test.handler.MockHandler;
-import org.apache.james.mpt.onami.test.mock.MockEngine;
-import org.apache.james.mpt.onami.test.reflection.ClassVisitor;
-import org.apache.james.mpt.onami.test.reflection.HandleException;
-import org.junit.runner.Runner;
-import org.junit.runner.notification.RunNotifier;
-import org.junit.runners.Suite;
-import org.junit.runners.model.InitializationError;
-import org.junit.runners.model.RunnerBuilder;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.matcher.Matchers;
-import com.google.inject.util.Modules;
-
-/**
- * <p>
- * It's a {@link Suite} runner.
- * </p>
- * <p>
- * This class creates a Google Guice {@link Injector} configured by {@link GuiceModules} annotation (only fr modules
- * with default constructor) and {@link GuiceProvidedModules} annotation and {@link Mock}.
- * </p>
- * <p>
- * <b>Example #1:</b> <br>
- * <p>
- * <pre>
- *
- * @org.junit.runner.RunWith( OnamiSuite.class )
- * @GuiceModules( SimpleModule.class )
- * @SuiteClasses({ .class })
- * public class AcmeTestCase
- * {
- *
- * @GuiceProvidedModules
- * static public Module getProperties()
- * {
- * ...
- * return Modules.combine(new ComplexModule( loadProperies() ), ... );
- * }
- *
- * </pre>
- * <p>
- * </p>
- * <p>
- * <b>Example #2:</b> <br>
- * <p>
- * <pre>
- *
- * @org.junit.runner.RunWith( OnamiSuite.class )
- * public class AcmeTestCase
- * extends com.google.inject.AbstractModule
- * {
- *
- * public void configure()
- * {
- * // Configure your proper modules
- * ...
- * bind( Service.class ).annotatedWith( TestAnnotation.class ).to( ServiceTestImpl.class );
- * ...
- * }
- *
- * @Mock
- * private AnotherService serviceMock;
- *
- * @Inject
- * private Service serviceTest;
- *
- * @org.junit.Test
- * public void test()
- * {
- * assertNotNull( serviceMock );
- * assertNotNull( serviceTest );
- * }
- * </pre>
- * <p>
- * </p>
- *
- * @see GuiceMockModule
- */
-public class OnamiSuite extends Suite {
-
- private static final Logger LOGGER = Logger.getLogger(OnamiSuite.class.getName());
-
- private final List<Module> allModules;
-
- private final Map<Field, Object> mocked = new HashMap<Field, Object>(1);
-
- private MockType mockFramework = MockType.EASY_MOCK;
-
- private static Class<?>[] getAnnotatedClasses(Class<?> klass) throws InitializationError {
- SuiteClasses annotation = klass.getAnnotation(SuiteClasses.class);
- if (annotation == null)
- throw new InitializationError(String.format("class '%s' must have a SuiteClasses annotation", klass.getName()));
- return annotation.value();
- }
-
- /**
- * OnamiRunner constructor to create the core JUnice class.
- *
- * @param klass The test case class to run.
- * @throws org.junit.runners.model.InitializationError if any error occurs.
- * @see org.junit.runner.RunWith
- */
- public OnamiSuite(Class<?> klass, RunnerBuilder builder)
- throws InitializationError {
- this(builder, klass, getAnnotatedClasses(klass));
-
- }
-
- /**
- * Called by this class and subclasses once the classes making up the suite have been determined
- *
- * @param builder builds runners for classes in the suite
- * @param klass the root of the suite
- * @param suiteClasses the classes in the suite
- * @throws InitializationError
- */
- protected OnamiSuite(RunnerBuilder builder, Class<?> suite, Class<?>[] suiteClasses)
- throws InitializationError {
- super(suite, runners(suite, suiteClasses));
- try {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("Inizializing injector for siote class: " + suite.getName());
- }
-
- this.allModules = inizializeInjector(suite);
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("done...");
- }
- } catch (Exception e) {
- final List<Throwable> throwables = new LinkedList<Throwable>();
- throwables.add(e);
- throw new InitializationError(throwables);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void run(final RunNotifier notifier) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" ### Run test case: " + getTestClass().getJavaClass() + " ### ");
- LOGGER.finer(" #### Creating injector ####");
- }
-
- createInjector(allModules);
- super.run(notifier);
- this.flush();
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" ### End test case: " + getTestClass().getJavaClass().getName() + " ### ");
- }
- }
-
- private static List<Runner> runners(Class<?> suite, Class<?>[] children) throws InitializationError {
- ArrayList<Runner> runners = new ArrayList<Runner>();
- for (Class<?> each : children) {
- Runner childRunner = new OnamiRunner(suite, each);
- if (childRunner != null)
- runners.add(childRunner);
- }
- return runners;
- }
-
- /**
- * {@inheritDoc}
- */
- private void flush() {
- this.allModules.clear();
- this.mocked.clear();
- }
-
- @Override
- protected void runChild(Runner runner, RunNotifier notifier) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" +++ invoke runner: " + runner + " +++ ");
- }
-
- super.runChild(runner, notifier);
- resetAllResetAfterMocks();
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" --- end runner: " + runner + " --- ");
- }
- }
-
- /**
- * Shortcut to create the Injector given a list of Modules.
- *
- * @param modules the list of modules have to be load
- * @return an Injector instance built using the input Module list
- */
- protected Injector createInjector(List<Module> modules) {
- return Guice.createInjector(modules);
- }
-
- /**
- * This method collects modules from {@link GuiceModules}, {@link GuiceProvidedModules}, {@link Mock}.
- *
- * @param <T> whatever input type is accepted
- * @param clazz the input class has to be analyzed
- * @return a List of Guice Modules built after input class analysis.
- * @throws IllegalAccessException when a n error occurs.
- * @throws InstantiationException when a n error occurs.
- * @throws HandleException when a n error occurs.
- */
- protected <T> List<Module> inizializeInjector(Class<T> clazz)
- throws HandleException, InstantiationException, IllegalAccessException {
- final List<Module> modules = new ArrayList<Module>();
- Module m = visitClass(clazz);
- if (m != null) {
- modules.add(m);
- }
- return modules;
- }
-
- private void resetAllResetAfterMocks() {
- for (Entry<Field, Object> entry : mocked.entrySet()) {
- final Mock mockAnnotation = entry.getKey().getAnnotation(Mock.class);
- if (mockAnnotation.resetAfter()) {
- MockEngine mockEngine = MockEngineFactory.getMockEngine(mockFramework);
- mockEngine.resetMock(entry.getValue());
- }
- }
- }
-
- /**
- * @throws HandleException
- * @throws IllegalAccessException
- * @throws InstantiationException
- */
- private <T> Module visitClass(final Class<T> clazz)
- throws HandleException, InstantiationException, IllegalAccessException {
- try {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" Start introspecting class: " + clazz.getName());
- }
- final List<Module> allModules = new ArrayList<Module>();
-
- // Setup the handlers
- final GuiceProvidedModuleHandler guiceProvidedModuleHandler = new GuiceProvidedModuleHandler();
- final GuiceModuleHandler guiceModuleHandler = new GuiceModuleHandler();
- final GuiceInjectableClassHandler<Inject> guiceInjectableClassHandler = new GuiceInjectableClassHandler<Inject>();
- final GuiceInjectableClassHandler<javax.inject.Inject> jsr330InjectableClassHandler = new GuiceInjectableClassHandler<javax.inject.Inject>();
-
- final MockHandler mockHandler = new MockHandler();
- final MockFrameworkHandler mockFrameworkHandler = new MockFrameworkHandler();
-
- // Visit class and super-classes
- new ClassVisitor()
- .registerHandler(GuiceProvidedModules.class, guiceProvidedModuleHandler)
- .registerHandler(GuiceModules.class, guiceModuleHandler)
- .registerHandler(Mock.class, mockHandler)
- .registerHandler(MockFramework.class, mockFrameworkHandler)
- .registerHandler(Inject.class, guiceInjectableClassHandler)
- .registerHandler(javax.inject.Inject.class, jsr330InjectableClassHandler)
- .visit(clazz);
-
- // Retrieve mock framework
- if (mockFrameworkHandler.getMockType() != null) {
- this.mockFramework = mockFrameworkHandler.getMockType();
- }
-
- // retrieve the modules founded
- allModules.addAll(guiceProvidedModuleHandler.getModules());
- allModules.addAll(guiceModuleHandler.getModules());
- MockEngine engine = MockEngineFactory.getMockEngine(this.mockFramework);
- this.mocked.putAll(mockHandler.getMockedObject(engine));
- if (!this.mocked.isEmpty()) {
- // Replace all real module binding with Mocked moduled.
- Module m = Modules.override(allModules).with(new GuiceMockModule(this.mocked));
- allModules.clear();
- allModules.add(m);
- }
-
- // Add only clasess that have got the Inject annotation
- final Class<?>[] guiceInjectableClasses = guiceInjectableClassHandler.getClasses();
- final Class<?>[] jsr330InjectableClasses = jsr330InjectableClassHandler.getClasses();
-
- final AbstractModule statcInjector = new AbstractModule() {
- @Override
- protected void configure() {
- // inject all STATIC dependencies
- if (guiceInjectableClasses.length != 0) {
- requestStaticInjection(guiceInjectableClasses);
- }
-
- if (jsr330InjectableClasses.length != 0) {
- requestStaticInjection(jsr330InjectableClasses);
- }
- }
- };
- if (guiceInjectableClasses.length != 0 || jsr330InjectableClasses.length != 0) {
- allModules.add(statcInjector);
- }
-
- // Check if the class is itself a Google Module.
- if (Module.class.isAssignableFrom(getTestClass().getJavaClass())) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" creating module from test class " + getTestClass().getJavaClass());
- }
- final Module classModule = (Module) getTestClass().getJavaClass().newInstance();
- allModules.add(classModule);
- }
-
- // create MockTypeListenerModule
- if (this.mocked.size() != 0) {
- final AbstractModule mockTypeListenerModule = new AbstractModule() {
- @Override
- protected void configure() {
- bindListener(Matchers.any(), new MockTypeListener(mocked));
- }
- };
-
- // BEGIN patch for issue: google-guice: #452
- for (Entry<Field, Object> entry : mocked.entrySet()) {
- final Field field = entry.getKey();
- final Object mock = entry.getValue();
- if (Modifier.isStatic(field.getModifiers())) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" inject static mock field: " + field.getName());
- }
- AccessController.doPrivileged(new PrivilegedAction<Void>() {
-
- public Void run() {
- field.setAccessible(true);
- return null;
- }
-
- });
- field.set(field.getDeclaringClass(), mock);
- }
- }
- // END patch for issue: google-guice: #452
- allModules.add(mockTypeListenerModule);
- }
-
- if (allModules.size() != 0) {
- if (LOGGER.isLoggable(Level.FINER)) {
- StringBuilder builder = new StringBuilder();
- builder.append(" Collected modules: ");
- builder.append("\n");
- for (Module module : allModules) {
- builder.append(" ").append(module);
- builder.append("\n");
- }
- LOGGER.finer(builder.toString());
- }
- return Modules.combine(allModules);
- }
- return null;
- } finally {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(" ...done");
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceModules.java
----------------------------------------------------------------------
diff --git a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceModules.java b/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceModules.java
deleted file mode 100644
index 075f552..0000000
--- a/mpt/onami-test/src/main/java/org/apache/james/mpt/onami/test/annotation/GuiceModules.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/****************************************************************
- * 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.onami.test.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import com.google.inject.Module;
-
-/**
- * Annotate your class to define a list of Google Guice {@link Module} whit default constructor.
- */
-@Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.TYPE)
-public @interface GuiceModules {
-
- /**
- * List of Google Guice {@link Module}.
- */
- Class<? extends Module>[] value();
-
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[05/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
new file mode 100644
index 0000000..8232ecd
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraAuthenticateTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.AuthenticateTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraAuthenticateTest extends AuthenticateTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
new file mode 100644
index 0000000..f66278f
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCapabilityTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.CapabilityTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraCapabilityTest extends CapabilityTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCheckScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCheckScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCheckScriptTest.java
new file mode 100644
index 0000000..2f883d3
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraCheckScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.CheckScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraCheckScriptTest extends CheckScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraDeleteScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraDeleteScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraDeleteScriptTest.java
new file mode 100644
index 0000000..f2da260
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraDeleteScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.DeleteScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraDeleteScriptTest extends DeleteScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraGetScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraGetScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraGetScriptTest.java
new file mode 100644
index 0000000..6aa0753
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraGetScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.GetScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraGetScriptTest extends GetScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraHaveSpaceTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraHaveSpaceTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraHaveSpaceTest.java
new file mode 100644
index 0000000..97f5ac0
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraHaveSpaceTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.HaveSpaceTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraHaveSpaceTest extends HaveSpaceTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraListScriptsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraListScriptsTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraListScriptsTest.java
new file mode 100644
index 0000000..19d794b
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraListScriptsTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.ListScriptsTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public abstract class CassandraListScriptsTest extends ListScriptsTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraLogoutTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraLogoutTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraLogoutTest.java
new file mode 100644
index 0000000..d63953d
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraLogoutTest.java
@@ -0,0 +1,50 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.LogoutTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraLogoutTest extends LogoutTest {
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraNoopTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraNoopTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraNoopTest.java
new file mode 100644
index 0000000..5245878
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraNoopTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.NoopTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraNoopTest extends NoopTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraPutScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraPutScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraPutScriptTest.java
new file mode 100644
index 0000000..e406fe3
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraPutScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.PutScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraPutScriptTest extends PutScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraRenameScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraRenameScriptTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraRenameScriptTest.java
new file mode 100644
index 0000000..a95f9d1
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraRenameScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.RenameScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraRenameScriptTest extends RenameScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraSetActiveTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraSetActiveTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraSetActiveTest.java
new file mode 100644
index 0000000..a82b69f
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraSetActiveTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.SetActiveTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraSetActiveTest extends SetActiveTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraStartTlsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraStartTlsTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraStartTlsTest.java
new file mode 100644
index 0000000..15a2a7a
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraStartTlsTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.StartTlsTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraStartTlsTest extends StartTlsTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraUnauthenticatedTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraUnauthenticatedTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraUnauthenticatedTest.java
new file mode 100644
index 0000000..66b524a
--- /dev/null
+++ b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/CassandraUnauthenticatedTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.cassandra;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.UnauthenticatedTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CassandraUnauthenticatedTest extends UnauthenticatedTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CassandraModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/ManageSieveCassandraTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/ManageSieveCassandraTest.java b/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/ManageSieveCassandraTest.java
deleted file mode 100644
index 22abd4a..0000000
--- a/mpt/impl/managesieve/cassandra/src/test/java/org/apache/james/mpt/managesieve/cassandra/ManageSieveCassandraTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************
- * 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.managesieve.cassandra;
-
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.apache.james.mpt.testsuite.AuthenticateTest;
-import org.apache.james.mpt.testsuite.CapabilityTest;
-import org.apache.james.mpt.testsuite.CheckScriptTest;
-import org.apache.james.mpt.testsuite.DeleteScriptTest;
-import org.apache.james.mpt.testsuite.GetScriptTest;
-import org.apache.james.mpt.testsuite.HaveSpaceTest;
-import org.apache.james.mpt.testsuite.ListScriptsTest;
-import org.apache.james.mpt.testsuite.LogoutTest;
-import org.apache.james.mpt.testsuite.NoopTest;
-import org.apache.james.mpt.testsuite.PutScriptTest;
-import org.apache.james.mpt.testsuite.RenameScriptTest;
-import org.apache.james.mpt.testsuite.SetActiveTest;
-import org.apache.james.mpt.testsuite.StartTlsTest;
-import org.apache.james.mpt.testsuite.UnauthenticatedTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@GuiceModules({ CassandraModule.class })
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
- NoopTest.class,
- UnauthenticatedTest.class,
- LogoutTest.class,
- AuthenticateTest.class,
- StartTlsTest.class,
- CapabilityTest.class,
- HaveSpaceTest.class,
- PutScriptTest.class,
- SetActiveTest.class,
- GetScriptTest.class,
- DeleteScriptTest.class,
- RenameScriptTest.class,
- CheckScriptTest.class,
- ListScriptsTest.class
-})
-public class ManageSieveCassandraTest {
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/pom.xml
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/pom.xml b/mpt/impl/managesieve/core/pom.xml
index 9e00fb9..e60cff8 100644
--- a/mpt/impl/managesieve/core/pom.xml
+++ b/mpt/impl/managesieve/core/pom.xml
@@ -53,10 +53,6 @@
<artifactId>junit</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.james</groupId>
- <artifactId>apache-james-mpt-onami-test</artifactId>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
@@ -78,4 +74,4 @@
</build>
-</project>
\ No newline at end of file
+</project>
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
index d802f72..5dd6bf0 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class AuthenticateTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class AuthenticateTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
index f8a2fbd..2af78f2 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class CapabilityTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class CapabilityTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
index 9363f67..0aa1760 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
@@ -19,27 +19,28 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
-
-public class CheckScriptTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class CheckScriptTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
index cdc7b53..ef7d972 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
+public abstract class DeleteScriptTest {
-public class DeleteScriptTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
-
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
index d302af4..16db749 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class GetScriptTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class GetScriptTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java
index 213b012..ccf49c7 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java
@@ -21,30 +21,37 @@ package org.apache.james.mpt.testsuite;
import java.util.Locale;
+import org.apache.james.mpt.api.HostSystem;
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.GenericSimpleScriptedTestProtocol.PrepareCommand;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class HaveSpaceTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class HaveSpaceTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- hostSystem.setMaxQuota(USER, 50);
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
- .withLocale(Locale.US);
+ .withLocale(Locale.US)
+ .withPreparedCommand(new PrepareCommand<HostSystem>() {
+ @Override
+ public void prepare(HostSystem system) throws Exception {
+ ((ManageSieveHostSystem) system).setMaxQuota(USER, 50);
+ }
+ });
}
@After
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java
index d27b3c9..268b049 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class ListScriptsTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class ListScriptsTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java
index 64b5079..78d938b 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class LogoutTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class LogoutTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java
index e881477..a1731da 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class NoopTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class NoopTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java
index 5337fcd..de5f425 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java
@@ -27,20 +27,21 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class PutScriptTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class PutScriptTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
+
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java
index e1c6cb4..816fb40 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class RenameScriptTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class RenameScriptTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java
index 9a3f044..2ebac69 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class SetActiveTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class SetActiveTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java
index ac61a1d..b92e9a1 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class StartTlsTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class StartTlsTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java
index aa1f64f..1f2d838 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java
@@ -27,20 +27,20 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
-
-public class UnauthenticatedTest {
-
- @Inject
- private static ManageSieveHostSystem hostSystem;
+public abstract class UnauthenticatedTest {
public static final String USER = "user";
public static final String PASSWORD = "password";
+ protected abstract ManageSieveHostSystem createManageSieveHostSystem();
+
+ private ManageSieveHostSystem hostSystem;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ hostSystem = createManageSieveHostSystem();
+ hostSystem.beforeTest();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileAuthenticateTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileAuthenticateTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileAuthenticateTest.java
new file mode 100644
index 0000000..3c4050a
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileAuthenticateTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.AuthenticateTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileAuthenticateTest extends AuthenticateTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCapabilityTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCapabilityTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCapabilityTest.java
new file mode 100644
index 0000000..26541d7
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCapabilityTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.CapabilityTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileCapabilityTest extends CapabilityTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCheckScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCheckScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCheckScriptTest.java
new file mode 100644
index 0000000..68d96ee
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileCheckScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.CheckScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileCheckScriptTest extends CheckScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileDeleteScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileDeleteScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileDeleteScriptTest.java
new file mode 100644
index 0000000..ed93212
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileDeleteScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.DeleteScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileDeleteScriptTest extends DeleteScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileGetScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileGetScriptTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileGetScriptTest.java
new file mode 100644
index 0000000..563f9ba
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileGetScriptTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.GetScriptTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileGetScriptTest extends GetScriptTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileHaveSpaceTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileHaveSpaceTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileHaveSpaceTest.java
new file mode 100644
index 0000000..4bb2739
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileHaveSpaceTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.HaveSpaceTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileHaveSpaceTest extends HaveSpaceTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileListScriptsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileListScriptsTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileListScriptsTest.java
new file mode 100644
index 0000000..497e186
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileListScriptsTest.java
@@ -0,0 +1,51 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.ListScriptsTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public abstract class FileListScriptsTest extends ListScriptsTest {
+
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileLogoutTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileLogoutTest.java b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileLogoutTest.java
new file mode 100644
index 0000000..2adc4c5
--- /dev/null
+++ b/mpt/impl/managesieve/file/src/test/java/org/apache/james/mpt/managesieve/file/FileLogoutTest.java
@@ -0,0 +1,50 @@
+/****************************************************************
+ * 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.managesieve.file;
+
+import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.testsuite.LogoutTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class FileLogoutTest extends LogoutTest {
+ private ManageSieveHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new FileModule());
+ system = injector.getInstance(ManageSieveHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ManageSieveHostSystem createManageSieveHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[08/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
index 5cdc63a..d695788 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedInbox.java
@@ -21,25 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class SelectedInbox implements ImapTestConstants {
+public abstract class SelectedInbox implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -48,11 +46,6 @@ public class SelectedInbox implements ImapTestConstants {
BasicImapCommands.selectInbox(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testValidNonAuthenticatedUS() throws Exception {
simpleScriptedTestProtocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
index bc30f44..64a1fcf 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/SelectedState.java
@@ -21,26 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class SelectedState implements ImapTestConstants {
+public abstract class SelectedState implements ImapTestConstants {
- @Inject
- private static HostSystem system;
-
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -49,11 +46,6 @@ public class SelectedState implements ImapTestConstants {
BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testCheckUS() throws Exception {
simpleScriptedTestProtocol
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
index 5e1d5e1..e408248 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
@@ -21,36 +21,29 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-public class UidSearch implements ImapTestConstants {
+public abstract class UidSearch implements ImapTestConstants {
- @Inject
- private static HostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
BasicImapCommands.welcome(simpleScriptedTestProtocol);
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
-
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
@Test
public void testSearchAtomsUS() throws Exception {
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
index 1029027..231768d 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
@@ -21,24 +21,23 @@ package org.apache.james.mpt.imapmailbox.suite;
import java.util.Locale;
-import javax.inject.Inject;
-
-import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.Before;
import org.junit.Test;
-public class UidSearchOnIndex implements ImapTestConstants {
-
- @Inject
- private static HostSystem system;
+public abstract class UidSearchOnIndex implements ImapTestConstants {
+ protected abstract ImapHostSystem createImapHostSystem();
+
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
index b0c832e..21b0465 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
@@ -26,22 +26,20 @@ import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
-import org.junit.After;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
-import com.google.inject.Inject;
+public abstract class UserFlagsSupport implements ImapTestConstants {
-public class UserFlagsSupport implements ImapTestConstants {
-
- @Inject
- private static ImapHostSystem system;
+ protected abstract ImapHostSystem createImapHostSystem();
+ private ImapHostSystem system;
private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
+ system = createImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
.withUser(USER, PASSWORD)
.withLocale(Locale.US);
@@ -49,11 +47,6 @@ public class UserFlagsSupport implements ImapTestConstants {
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
- @After
- public void tearDown() throws Exception {
- system.afterTest();
- }
-
@Test
public void testUserFlagsSupport() throws Exception {
Assume.assumeTrue(system.supports(ImapFeatures.Feature.USER_FLAGS_SUPPORT));
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
index 9d508b0..0c4b18d 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
@@ -21,16 +21,17 @@ package org.apache.james.mpt.imapmailbox.suite.base;
import org.apache.james.mpt.api.ProtocolInteractor;
import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.script.GenericSimpleScriptedTestProtocol;
import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
public class BasicImapCommands implements ImapTestConstants {
- public static void welcome(SimpleScriptedTestProtocol scriptedTestProtocol) {
+ public static void welcome(GenericSimpleScriptedTestProtocol<?, ?> scriptedTestProtocol) {
scriptedTestProtocol.preElements().SL("\\* OK IMAP4rev1 Server ready", "BaseAuthenticatedState.java:32");
}
- public static void authenticate(SimpleScriptedTestProtocol scriptedTestProtocol) {
+ public static void authenticate(GenericSimpleScriptedTestProtocol<?, ?> scriptedTestProtocol) {
addLogin(scriptedTestProtocol.preElements(), USER, PASSWORD);
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
new file mode 100644
index 0000000..a392ec8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
@@ -0,0 +1,41 @@
+package org.apache.james.mpt.imapmailbox.cyrus;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
+import org.apache.james.mpt.imapmailbox.suite.ACLCommands;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CyrusACLCommands extends ACLCommands {
+
+ private ImapHostSystem system;
+ private GrantRightsOnHost grantRightsOnHost;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CyrusMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ grantRightsOnHost = injector.getInstance(GrantRightsOnHost.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+ @Override
+ protected GrantRightsOnHost createGrantRightsOnHost() {
+ return grantRightsOnHost;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
new file mode 100644
index 0000000..d0ca3c4
--- /dev/null
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
@@ -0,0 +1,49 @@
+package org.apache.james.mpt.imapmailbox.cyrus;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
+import org.apache.james.mpt.imapmailbox.MailboxMessageAppender;
+import org.apache.james.mpt.imapmailbox.suite.ACLIntegration;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class CyrusACLIntegration extends ACLIntegration {
+
+ private ImapHostSystem system;
+ private GrantRightsOnHost grantRightsOnHost;
+ private MailboxMessageAppender mailboxMessageAppender;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new CyrusMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ grantRightsOnHost = injector.getInstance(GrantRightsOnHost.class);
+ mailboxMessageAppender = injector.getInstance(MailboxMessageAppender.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+ @Override
+ protected GrantRightsOnHost createGrantRightsOnHost() {
+ return grantRightsOnHost;
+ }
+
+ @Override
+ protected MailboxMessageAppender createMailboxMessageAppender() {
+ return mailboxMessageAppender;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTest.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTest.java
deleted file mode 100644
index 5a2b6bc..0000000
--- a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************
- * 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.cyrus;
-
-import org.apache.james.mpt.imapmailbox.suite.ACLCommands;
-import org.apache.james.mpt.imapmailbox.suite.ACLIntegration;
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(OnamiSuite.class)
-@SuiteClasses({
- ACLCommands.class,
- ACLIntegration.class
-// 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
-})
-@GuiceModules({CyrusMailboxTestModule.class})
-public class CyrusMailboxTest {
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTest.java b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTest.java
deleted file mode 100644
index 36fa2fd..0000000
--- a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchMailboxTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************
- * 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.elasticsearch;
-
-import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
- UidSearchOnIndex.class
-})
-@GuiceModules({ElasticSearchMailboxTestModule.class})
-public class ElasticSearchMailboxTest {
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
new file mode 100644
index 0000000..e3fbde8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
@@ -0,0 +1,33 @@
+package org.apache.james.mpt.imapmailbox.elasticsearch;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class ElasticSearchUidSearchOnIndex extends UidSearchOnIndex {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new ElasticSearchMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/ExternalJamesTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/ExternalJamesTest.java b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/ExternalJamesTest.java
deleted file mode 100644
index 39e1966..0000000
--- a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/ExternalJamesTest.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/****************************************************************
- * 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.external.james;
-
-import org.apache.james.mpt.imapmailbox.suite.DeploymentValidation;
-
-import org.apache.james.mpt.onami.test.OnamiSuite;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-@RunWith(OnamiSuite.class)
-@Suite.SuiteClasses({
- DeploymentValidation.class
-})
-@GuiceModules({ExternalJamesModule.class})
-public class ExternalJamesTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
new file mode 100644
index 0000000..3ab0e9d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.external.james;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.DeploymentValidation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class JamesDeploymentValidation extends DeploymentValidation {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new ExternalJamesModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ system.beforeTest();
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
new file mode 100644
index 0000000..9779470
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseAuthenticatePlain extends AuthenticatePlain {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
new file mode 100644
index 0000000..d0c087e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseAuthenticatedState extends AuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
new file mode 100644
index 0000000..0c58987
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseConcurrentSessions.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseConcurrentSessions extends ConcurrentSessions {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
new file mode 100644
index 0000000..3781b03
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why it was no enabled on cassandra ?")
+public class HBaseCondstore extends Condstore {
+
+ private JamesImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(JamesImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected JamesImapHostSystem createJamesImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
new file mode 100644
index 0000000..252c8e6
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCopy.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseCopy extends Copy {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
new file mode 100644
index 0000000..b25f337
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseEvents.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseEvents extends Events {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
new file mode 100644
index 0000000..5ed5396
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseExpunge.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseExpunge extends Expunge {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
new file mode 100644
index 0000000..c985e1a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseFetch extends Fetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
new file mode 100644
index 0000000..7fa1f01
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodySection.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseFetchBodySection extends FetchBodySection {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
new file mode 100644
index 0000000..9402b37
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchBodyStructure.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseFetchBodyStructure extends FetchBodyStructure {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
new file mode 100644
index 0000000..3e82982
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseFetchHeaders.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseFetchHeaders extends FetchHeaders {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
new file mode 100644
index 0000000..d04fd85
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseListing.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseListing extends Listing {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
new file mode 100644
index 0000000..8e48c4c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseMailboxAnnotation extends MailboxAnnotation {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTest.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTest.java
deleted file mode 100644
index bbbe160..0000000
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTest.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.apache.james.mpt.imapmailbox.hbase;
-
-import org.apache.james.mpt.imapmailbox.AbstractMailboxTest;
-import org.apache.james.mpt.onami.test.annotation.GuiceModules;
-
-@GuiceModules({ HBaseMailboxTestModule.class })
-public class HBaseMailboxTest extends AbstractMailboxTest {
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
new file mode 100644
index 0000000..9e33c2c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameError.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameError;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseMailboxWithLongNameError extends MailboxWithLongNameError {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
new file mode 100644
index 0000000..6c76d12
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxWithLongNameSuccess.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxWithLongNameSuccess;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("do we have a JIRA for that ?")
+public class HBaseMailboxWithLongNameSuccess extends MailboxWithLongNameSuccess {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
new file mode 100644
index 0000000..856b04c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMove.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Move;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseMove extends Move {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
new file mode 100644
index 0000000..0c959c8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseNonAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.NonAuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseNonAuthenticatedState extends NonAuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
new file mode 100644
index 0000000..4e12099
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBasePartialFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.PartialFetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBasePartialFetch extends PartialFetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
new file mode 100644
index 0000000..5334bfe
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseQuotaTest.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.QuotaTest;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseQuotaTest extends QuotaTest {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
new file mode 100644
index 0000000..8e2f8d8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseRename.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Rename;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseRename extends Rename {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
new file mode 100644
index 0000000..7bfe052
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Search;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSearch extends Search {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
new file mode 100644
index 0000000..f8fab11
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSecurity.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Security;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSecurity extends Security {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
new file mode 100644
index 0000000..398db0e
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelect.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Select;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSelect extends Select {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
new file mode 100644
index 0000000..faddd49
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedInbox.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedInbox;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSelectedInbox extends SelectedInbox {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
new file mode 100644
index 0000000..5041583
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseSelectedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.SelectedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseSelectedState extends SelectedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
new file mode 100644
index 0000000..763975f
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseUidSearch extends UidSearch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
new file mode 100644
index 0000000..4272454
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUidSearchOnIndex.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UidSearchOnIndex;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseUidSearchOnIndex extends UidSearchOnIndex {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
new file mode 100644
index 0000000..d85e19a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseUserFlagsSupport.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.hbase;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.UserFlagsSupport;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class HBaseUserFlagsSupport extends UserFlagsSupport {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new HBaseMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
new file mode 100644
index 0000000..9600232
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatePlain.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatePlain;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryAuthenticatePlain extends AuthenticatePlain {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
new file mode 100644
index 0000000..3564984
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryAuthenticatedState.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.AuthenticatedState;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryAuthenticatedState extends AuthenticatedState {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
new file mode 100644
index 0000000..3ce904a
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryConcurrentSessions.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.ConcurrentSessions;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryConcurrentSessions extends ConcurrentSessions {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
new file mode 100644
index 0000000..be72a68
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
@@ -0,0 +1,34 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Condstore;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+@Ignore("why it was no enabled on cassandra ?")
+public class InMemoryCondstore extends Condstore {
+
+ private JamesImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(JamesImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected JamesImapHostSystem createJamesImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
new file mode 100644
index 0000000..1d72ad9
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCopy.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Copy;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryCopy extends Copy {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
new file mode 100644
index 0000000..d23db49
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryEvents.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Events;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryEvents extends Events {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
new file mode 100644
index 0000000..35bcce8
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryExpunge.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Expunge;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryExpunge extends Expunge {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
new file mode 100644
index 0000000..8313017
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetch.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Fetch;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryFetch extends Fetch {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
new file mode 100644
index 0000000..0a3150d
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodySection.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodySection;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryFetchBodySection extends FetchBodySection {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
new file mode 100644
index 0000000..22a27a5
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchBodyStructure.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchBodyStructure;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryFetchBodyStructure extends FetchBodyStructure {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
new file mode 100644
index 0000000..94ed875
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryFetchHeaders.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.FetchHeaders;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryFetchHeaders extends FetchHeaders {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
new file mode 100644
index 0000000..b263205
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryListing.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.Listing;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryListing extends Listing {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/78cf06ab/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
new file mode 100644
index 0000000..60be1fa
--- /dev/null
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryMailboxAnnotation.java
@@ -0,0 +1,32 @@
+package org.apache.james.mpt.imapmailbox.inmemory;
+
+import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.suite.MailboxAnnotation;
+import org.junit.After;
+import org.junit.Before;
+
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+
+public class InMemoryMailboxAnnotation extends MailboxAnnotation {
+
+ private ImapHostSystem system;
+
+ @Before
+ public void setUp() throws Exception {
+ Injector injector = Guice.createInjector(new InMemoryMailboxTestModule());
+ system = injector.getInstance(ImapHostSystem.class);
+ super.setUp();
+ }
+
+ @Override
+ protected ImapHostSystem createImapHostSystem() {
+ return system;
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[13/21] james-project git commit: MPT-39 remove crazy abstract test
class hierarchy
Posted by ad...@apache.org.
MPT-39 remove crazy abstract test class hierarchy
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/986df60d
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/986df60d
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/986df60d
Branch: refs/heads/master
Commit: 986df60d3ebdbba3239a00810d427267c80d5921
Parents: 46cd28e
Author: Matthieu Baechler <ma...@apache.org>
Authored: Wed Jun 21 16:52:13 2017 +0200
Committer: Matthieu Baechler <ma...@apache.org>
Committed: Thu Jul 6 10:32:17 2017 -0400
----------------------------------------------------------------------
.../script/AbstractProtocolTestFramework.java | 115 ---------
.../AbstractSimpleScriptedTestProtocol.java | 111 ---------
.../mpt/script/SimpleScriptedTestProtocol.java | 181 ++++++++++++++
.../mpt/imapmailbox/suite/ACLCommands.java | 51 ++--
.../mpt/imapmailbox/suite/ACLIntegration.java | 89 +++----
.../imapmailbox/suite/AuthenticatePlain.java | 33 ++-
.../imapmailbox/suite/AuthenticatedState.java | 234 +++++++++++++------
.../imapmailbox/suite/ConcurrentSessions.java | 115 ++++++---
.../james/mpt/imapmailbox/suite/Condstore.java | 25 +-
.../james/mpt/imapmailbox/suite/Copy.java | 22 +-
.../imapmailbox/suite/DeploymentValidation.java | 29 ++-
.../james/mpt/imapmailbox/suite/Events.java | 37 ++-
.../james/mpt/imapmailbox/suite/Expunge.java | 38 ++-
.../james/mpt/imapmailbox/suite/Fetch.java | 122 +++++++---
.../mpt/imapmailbox/suite/FetchBodySection.java | 61 +++--
.../imapmailbox/suite/FetchBodyStructure.java | 74 ++++--
.../mpt/imapmailbox/suite/FetchHeaders.java | 50 +++-
.../james/mpt/imapmailbox/suite/Listing.java | 47 +++-
.../imapmailbox/suite/MailboxAnnotation.java | 39 +++-
.../suite/MailboxWithLongNameError.java | 31 ++-
.../suite/MailboxWithLongNameSuccess.java | 26 ++-
.../james/mpt/imapmailbox/suite/Move.java | 30 ++-
.../suite/NonAuthenticatedState.java | 107 +++++++--
.../mpt/imapmailbox/suite/PartialFetch.java | 74 ++++--
.../james/mpt/imapmailbox/suite/QuotaTest.java | 41 +++-
.../james/mpt/imapmailbox/suite/Rename.java | 62 +++--
.../james/mpt/imapmailbox/suite/Search.java | 48 +++-
.../james/mpt/imapmailbox/suite/Security.java | 112 ++++++---
.../james/mpt/imapmailbox/suite/Select.java | 36 ++-
.../mpt/imapmailbox/suite/SelectedInbox.java | 193 +++++++++++----
.../mpt/imapmailbox/suite/SelectedState.java | 146 +++++++++---
.../james/mpt/imapmailbox/suite/UidSearch.java | 48 +++-
.../mpt/imapmailbox/suite/UidSearchOnIndex.java | 31 ++-
.../mpt/imapmailbox/suite/UserFlagsSupport.java | 31 ++-
.../suite/base/BaseAuthenticatedState.java | 85 -------
.../suite/base/BaseImapProtocol.java | 39 ----
.../suite/base/BaseNonAuthenticatedState.java | 59 -----
.../suite/base/BaseSelectedInbox.java | 75 ------
.../suite/base/BaseSelectedState.java | 64 -----
.../suite/base/BasicImapCommands.java | 68 ++++++
.../james/mpt/testsuite/AuthenticateTest.java | 29 ++-
.../james/mpt/testsuite/CapabilityTest.java | 29 ++-
.../james/mpt/testsuite/CheckScriptTest.java | 24 +-
.../james/mpt/testsuite/DeleteScriptTest.java | 31 ++-
.../james/mpt/testsuite/GetScriptTest.java | 29 ++-
.../james/mpt/testsuite/HaveSpaceTest.java | 29 ++-
.../james/mpt/testsuite/ListScriptsTest.java | 29 ++-
.../apache/james/mpt/testsuite/LogoutTest.java | 31 ++-
.../james/mpt/testsuite/ManageSieveMPTTest.java | 33 ---
.../apache/james/mpt/testsuite/NoopTest.java | 33 ++-
.../james/mpt/testsuite/PutScriptTest.java | 29 ++-
.../james/mpt/testsuite/RenameScriptTest.java | 29 ++-
.../james/mpt/testsuite/SetActiveTest.java | 29 ++-
.../james/mpt/testsuite/StartTlsTest.java | 29 ++-
.../mpt/testsuite/UnauthenticatedTest.java | 29 ++-
.../apache/james/mpt/smtp/ForwardSmtpTest.java | 13 +-
.../james/mpt/smtp/SmtpStarttlsCommandTest.java | 30 ++-
57 files changed, 2138 insertions(+), 1226 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractProtocolTestFramework.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractProtocolTestFramework.java b/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractProtocolTestFramework.java
deleted file mode 100644
index 3d2ac5d..0000000
--- a/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractProtocolTestFramework.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************
- * 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.script;
-
-import org.apache.james.mpt.Runner;
-import org.apache.james.mpt.api.Continuation;
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.api.Session;
-import org.apache.james.mpt.protocol.ProtocolSession;
-
-/**
- * Abstract Protocol Test is the root of all of the scripted test cases. It
- * provides basic functionality for running a protocol session as a JUnit test,
- * and failing if exceptions are thrown. To create a test which reads the entire
- * protocol session from a single protocol definition file, use the
- * {@link AbstractSimpleScriptedTestProtocol}.
- *
- * @author Darrell DeBoer
- * @author Andrew C. Oliver
- */
-public abstract class AbstractProtocolTestFramework {
-
- /** The Protocol session which is run before the testElements */
- protected ProtocolSession preElements = new ProtocolSession();
-
- /** The Protocol session which contains the tests elements */
- protected ProtocolSession testElements = new ProtocolSession();
-
- /** The Protocol session which is run after the testElements. */
- protected ProtocolSession postElements = new ProtocolSession();
-
- protected final Runner runner;
- private final HostSystem hostSystem;
-
- private final String userName;
- private final String password;
-
- public AbstractProtocolTestFramework(HostSystem hostSystem, String userName, String password) {
- this.hostSystem = hostSystem;
- this.userName = userName;
- this.password = password;
- runner = new Runner();
- }
-
- protected void setUp() throws Exception {
- hostSystem.beforeTest();
- hostSystem.addUser(userName, password);
- }
-
- protected void tearDown() throws Exception {
- hostSystem.afterTest();
- }
-
- /**
- * <p>
- * Runs the pre,test and post protocol sessions against a local copy of the
- * Server. This is useful for rapid development and debugging.
- * </p>
- * Instead of sending requests to a socket connected to a running instance
- * of James, this method uses the {@link HostSystem} to simplify testing.
- * One mock instance is required per protocol session/connection.
- */
- protected void runSessions() throws Exception {
- class SessionContinuation implements Continuation {
-
- public ProtocolSession session;
-
- public void doContinue() {
- if (session != null) {
- session.doContinue();
- }
- }
-
- }
- SessionContinuation continuation = new SessionContinuation();
-
- Session[] sessions = new Session[testElements.getSessionCount()];
-
- for (int i = 0; i < sessions.length; i++) {
- sessions[i] = hostSystem.newSession(continuation);
- sessions[i].start();
- }
- try {
- continuation.session = preElements;
- preElements.runSessions(sessions);
- continuation.session = testElements;
- testElements.runSessions(sessions);
- continuation.session = postElements;
- postElements.runSessions(sessions);
- }
- finally {
- for (Session session : sessions) {
- session.stop();
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractSimpleScriptedTestProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractSimpleScriptedTestProtocol.java b/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractSimpleScriptedTestProtocol.java
deleted file mode 100644
index f761f00..0000000
--- a/mpt/core/src/main/java/org/apache/james/mpt/script/AbstractSimpleScriptedTestProtocol.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************
- * 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.script;
-
-import java.io.InputStream;
-import java.util.Locale;
-
-import org.apache.commons.io.IOUtils;
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.protocol.FileProtocolSessionBuilder;
-import org.apache.james.mpt.protocol.ProtocolSession;
-import org.junit.After;
-
-/**
- * A Protocol test which reads the test protocol session from a file. The file
- * read is taken as "<test-name>.test", where <test-name> is the value passed
- * into the constructor. Subclasses of this test can set up {@link #preElements}
- * and {@link #postElements} for extra elements not defined in the protocol
- * session file.
- */
-public abstract class AbstractSimpleScriptedTestProtocol extends AbstractProtocolTestFramework {
-
- private static final Locale BASE_DEFAULT_LOCALE = Locale.getDefault();
-
- private final FileProtocolSessionBuilder builder = new FileProtocolSessionBuilder();
- private final String scriptDirectory;
-
- /**
- * Sets up a SimpleFileProtocolTest which reads the protocol session from a
- * file of name "<fileName>.test". This file should be available in the
- * classloader in the same location as this test class.
- *
- * @param scriptDirectory
- * name of the directory containing the scripts to be run
- * @param fileName
- * The name of the file to read protocol elements from.
- * @throws Exception
- */
- public AbstractSimpleScriptedTestProtocol(HostSystem hostSystem, String userName, String password,
- String scriptDirectory) throws Exception {
- super(hostSystem, userName, password);
- this.scriptDirectory = scriptDirectory;
- }
-
- @After
- public void tearDown() throws Exception {
- super.tearDown();
- Locale.setDefault(BASE_DEFAULT_LOCALE);
- }
-
- /**
- * Reads test elements from the protocol session file and adds them to the
- * {@link #testElements} ProtocolSession. Then calls {@link #runSessions}.
- *
- * @param locale
- * execute the test using this locale
- */
- protected void scriptTest(String fileName, Locale locale) throws Exception {
- Locale.setDefault(locale);
- addTestFile(fileName + ".test", testElements);
- runSessions();
- }
-
- /**
- * Finds the protocol session file identified by the test name, and builds
- * protocol elements from it. All elements from the definition file are
- * added to the supplied ProtocolSession.
- *
- * @param fileName
- * The name of the file to read
- * @param session
- * The ProtocolSession to add elements to.
- */
- protected void addTestFile(String fileName, ProtocolSession session) throws Exception {
-
- fileName = scriptDirectory + fileName;
-
- // Need to find local resource.
- InputStream is = this.getClass().getResourceAsStream(fileName);
-
- if (is == null) {
- throw new Exception("Test Resource '" + fileName + "' not found.");
- }
-
- try {
- builder.addProtocolLinesFromStream(is, session, fileName);
- }
- finally {
- IOUtils.closeQuietly(is);
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java b/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java
new file mode 100644
index 0000000..f412df6
--- /dev/null
+++ b/mpt/core/src/main/java/org/apache/james/mpt/script/SimpleScriptedTestProtocol.java
@@ -0,0 +1,181 @@
+/****************************************************************
+ * 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.script;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.james.mpt.api.Continuation;
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.api.Session;
+import org.apache.james.mpt.protocol.FileProtocolSessionBuilder;
+import org.apache.james.mpt.protocol.ProtocolSession;
+
+public final class SimpleScriptedTestProtocol {
+
+ private final FileProtocolSessionBuilder builder = new FileProtocolSessionBuilder();
+ private final String scriptDirectory;
+
+ /** The Protocol session which is run before the testElements */
+ private ProtocolSession preElements = new ProtocolSession();
+
+ /** The Protocol session which contains the tests elements */
+ private ProtocolSession testElements = new ProtocolSession();
+
+ /** The Protocol session which is run after the testElements. */
+ private ProtocolSession postElements = new ProtocolSession();
+
+ private Locale locale;
+ private HostSystem hostSystem;
+ private Map<String, String> users;
+
+ public SimpleScriptedTestProtocol(String scriptDirectory, HostSystem hostSystem) throws Exception {
+ this.scriptDirectory = scriptDirectory;
+ this.hostSystem = hostSystem;
+ this.locale = Locale.getDefault();
+ this.users = new HashMap<String, String>();
+ }
+
+ public SimpleScriptedTestProtocol withLocale(Locale locale) {
+ this.locale = locale;
+ return this;
+ }
+
+ public SimpleScriptedTestProtocol withUser(String userAtDomain, String password) {
+ users.put(userAtDomain, password);
+ return this;
+ }
+
+ public ProtocolSession preElements() {
+ return preElements;
+ }
+
+ public ProtocolSession testElements() {
+ return testElements;
+ }
+
+ public ProtocolSession postElements() {
+ return postElements;
+ }
+
+ /**
+ * Reads test elements from the protocol session file and adds them to the
+ * {@link #testElements} ProtocolSession. Then calls {@link #runSessions}.
+ * @param locale
+ * execute the test using this locale
+ */
+ public void run(String fileName) throws Exception {
+ createUsers();
+ Locale previousLocale = Locale.getDefault();
+ try {
+ Locale.setDefault(locale);
+ addTestFile(fileName + ".test", testElements);
+ runSessions(hostSystem);
+ } finally {
+ Locale.setDefault(previousLocale);
+ }
+ }
+
+
+ private void createUsers() throws Exception {
+ for (Entry<String, String> user: users.entrySet()) {
+ hostSystem.addUser(user.getKey(), user.getValue());
+ }
+ }
+
+ /**
+ * <p>
+ * Runs the pre,test and post protocol sessions against a local copy of the
+ * Server. This is useful for rapid development and debugging.
+ * </p>
+ * Instead of sending requests to a socket connected to a running instance
+ * of James, this method uses the {@link HostSystem} to simplify testing.
+ * One mock instance is required per protocol session/connection.
+ */
+ private void runSessions(HostSystem hostSystem) throws Exception {
+ class SessionContinuation implements Continuation {
+
+ public ProtocolSession session;
+
+ public void doContinue() {
+ if (session != null) {
+ session.doContinue();
+ }
+ }
+
+ }
+ SessionContinuation continuation = new SessionContinuation();
+
+ Session[] sessions = new Session[testElements.getSessionCount()];
+
+ for (int i = 0; i < sessions.length; i++) {
+ sessions[i] = hostSystem.newSession(continuation);
+ sessions[i].start();
+ }
+ try {
+ continuation.session = preElements;
+ preElements.runSessions(sessions);
+ continuation.session = testElements;
+ testElements.runSessions(sessions);
+ continuation.session = postElements;
+ postElements.runSessions(sessions);
+ }
+ finally {
+ for (Session session : sessions) {
+ session.stop();
+ }
+ }
+ }
+
+ /**
+ * Finds the protocol session file identified by the test name, and builds
+ * protocol elements from it. All elements from the definition file are
+ * added to the supplied ProtocolSession.
+ *
+ * @param fileName
+ * The name of the file to read
+ * @param session
+ * The ProtocolSession to add elements to.
+ */
+ public void addTestFile(String fileName, ProtocolSession session) throws Exception {
+
+ fileName = scriptDirectory + fileName;
+
+ // Need to find local resource.
+ InputStream is = this.getClass().getResourceAsStream(fileName);
+
+ if (is == null) {
+ throw new Exception("Test Resource '" + fileName + "' not found.");
+ }
+
+ try {
+ builder.addProtocolLinesFromStream(is, session, fileName);
+ }
+ finally {
+ IOUtils.closeQuietly(is);
+ }
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
index 8ff42f3..2fd93d2 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLCommands.java
@@ -19,68 +19,85 @@
package org.apache.james.mpt.imapmailbox.suite;
+import java.util.Locale;
+
+import javax.inject.Inject;
+
import org.apache.james.mailbox.model.MailboxACL;
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.model.SimpleMailboxACL;
import org.apache.james.mpt.api.HostSystem;
import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseImapProtocol;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
import org.junit.Test;
-import javax.inject.Inject;
-import java.util.Locale;
-
-public class ACLCommands extends BaseImapProtocol {
+public class ACLCommands implements ImapTestConstants {
public static final String OTHER_USER_NAME = "Boby";
public static final String OTHER_USER_PASSWORD = "password";
public static final MailboxPath OTHER_USER_MAILBOX = new MailboxPath("#private", OTHER_USER_NAME, "") ;
- private final MailboxACL.MailboxACLRights readWriteSeenRight;
@Inject
private static HostSystem system;
+
@Inject
private GrantRightsOnHost grantRightsOnHost;
- public ACLCommands() throws Exception {
- super(system);
+ private MailboxACL.MailboxACLRights readWriteSeenRight;
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(TO_ADDRESS, PASSWORD)
+ .withLocale(Locale.US);
readWriteSeenRight = new SimpleMailboxACL.Rfc4314Rights("rsw");
}
@Test
public void testACLCommandsOwnerUS() throws Exception {
- scriptTest("ACLCommandsOnOwner", Locale.US);
+ simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
}
@Test
public void testACLCommandsOtherUserUS() throws Exception {
- system.addUser(OTHER_USER_NAME, OTHER_USER_PASSWORD);
+ simpleScriptedTestProtocol
+ .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD);
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
- scriptTest("ACLCommandsOnOtherUser", Locale.US);
+ simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
}
@Test
public void testACLCommandsOwnerKorea() throws Exception {
- scriptTest("ACLCommandsOnOwner", Locale.KOREA);
+ simpleScriptedTestProtocol.withLocale(Locale.KOREA);
+ simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
}
@Test
public void testACLCommandsOtherUserKorea() throws Exception {
- system.addUser(OTHER_USER_NAME, OTHER_USER_PASSWORD);
+ simpleScriptedTestProtocol
+ .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
+ .withLocale(Locale.KOREA);
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
- scriptTest("ACLCommandsOnOtherUser", Locale.KOREA);
+ simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
}
@Test
public void testACLCommandsOwnerItaly() throws Exception {
- scriptTest("ACLCommandsOnOwner", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY);
+ simpleScriptedTestProtocol.run("ACLCommandsOnOwner");
}
@Test
public void testACLCommandsOtherUserItaly() throws Exception {
- system.addUser(OTHER_USER_NAME, OTHER_USER_PASSWORD);
+ simpleScriptedTestProtocol
+ .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
+ .withLocale(Locale.ITALY);
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, readWriteSeenRight);
- scriptTest("ACLCommandsOnOtherUser", Locale.ITALY);
+ simpleScriptedTestProtocol.run("ACLCommandsOnOtherUser");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
index 165a230..c31a5fd 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
@@ -19,18 +19,21 @@
package org.apache.james.mpt.imapmailbox.suite;
+import java.util.Locale;
+
+import javax.inject.Inject;
+
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mailbox.model.SimpleMailboxACL;
import org.apache.james.mpt.api.ImapHostSystem;
import org.apache.james.mpt.imapmailbox.GrantRightsOnHost;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
import org.apache.james.mpt.imapmailbox.MailboxMessageAppender;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseImapProtocol;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
import org.junit.Test;
-import javax.inject.Inject;
-import java.util.Locale;
-
-public class ACLIntegration extends BaseImapProtocol {
+public class ACLIntegration implements ImapTestConstants {
public static final String OTHER_USER_NAME = "Boby";
public static final String OTHER_USER_PASSWORD = "password";
public static final MailboxPath OTHER_USER_MAILBOX = new MailboxPath("#private", OTHER_USER_NAME, "");
@@ -43,64 +46,64 @@ public class ACLIntegration extends BaseImapProtocol {
@Inject
private MailboxMessageAppender mailboxMessageAppender;
- public ACLIntegration() throws Exception {
- super(system);
- }
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
- @Override
+ @Before
public void setUp() throws Exception {
- super.setUp();
- system.addUser(OTHER_USER_NAME, OTHER_USER_PASSWORD);
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(TO_ADDRESS, PASSWORD)
+ .withUser(OTHER_USER_NAME, OTHER_USER_PASSWORD)
+ .withLocale(Locale.US);
}
-
+
@Test
public void rightRShouldBeSufficientToPerformStatusSelectCloseExamineUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("r"));
- scriptTest("aclIntegration/ACLIntegrationRightR", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightR");
}
@Test
public void rightRShouldBeNeededToPerformStatusSelectCloseExamineUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("lswipkxtecda"));
- scriptTest("aclIntegration/ACLIntegrationWithoutRightR", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightR");
}
@Test
public void rightLShouldBeSufficientToPerformListUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("l"));
- scriptTest("aclIntegration/ACLIntegrationRightL", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightL");
}
@Test
public void rightLShouldBeNeededToPerformListLsubSubscribeUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecda"));
- scriptTest("aclIntegration/ACLIntegrationWithoutRightL", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightL");
}
@Test
public void rightAShouldBeSufficientToManageACLUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("a"));
- scriptTest("aclIntegration/ACLIntegrationRightA", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightA");
}
@Test
public void rightAShouldBeNeededToManageACLUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipkxtecdl"));
- scriptTest("aclIntegration/ACLIntegrationWithoutRightA", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightA");
}
@Test
public void rightXOnOriginShouldBeSufficientToRenameAMailboxUS() throws Exception {
system.createMailbox(new MailboxPath("#private","Boby","test"));
grantRightsOnHost.grantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("x"));
- scriptTest("aclIntegration/ACLIntegrationRightX", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightX");
}
@Test
public void rightXOnOriginShouldBeNeededToRenameAMailboxUS() throws Exception {
system.createMailbox(new MailboxPath("#private","Boby","test"));
grantRightsOnHost.grantRights(new MailboxPath("#private", OTHER_USER_NAME, "test"), USER, new SimpleMailboxACL.Rfc4314Rights("rswipktela"));
- scriptTest("aclIntegration/ACLIntegrationWithoutRightX", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightX");
}
@Test
@@ -109,7 +112,7 @@ public class ACLIntegration extends BaseImapProtocol {
system.createMailbox(newMailbox);
grantRightsOnHost.grantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"));
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("k"));
- scriptTest("aclIntegration/ACLIntegrationRightK", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightK");
}
@Test
@@ -118,146 +121,146 @@ public class ACLIntegration extends BaseImapProtocol {
system.createMailbox(newMailbox);
grantRightsOnHost.grantRights(newMailbox, USER, new SimpleMailboxACL.Rfc4314Rights("x"));
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtela"));
- scriptTest("aclIntegration/ACLIntegrationWithoutRightK", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightK");
}
@Test
public void rightREShouldBeSufficientToPerformExpungeUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("re"));
- scriptTest("aclIntegration/ACLIntegrationRightRE", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRE");
}
@Test
public void rightEShouldBeNeededToPerformExpungeUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswipxtclak"));
- scriptTest("aclIntegration/ACLIntegrationWithoutRightE", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightE");
}
@Test
public void rightIShouldBeSufficientToPerformAppendUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ri"));
- scriptTest("aclIntegration/ACLIntegrationRightI", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightI");
}
@Test
public void rightIShouldBeNeededToPerformAppendUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswepxtcdlak"));
- scriptTest("aclIntegration/ACLIntegrationWithoutRightI", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightI");
}
@Test
public void rightISShouldBeSufficientToPerformAppendOfSeenMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"));
- scriptTest("aclIntegration/ACLIntegrationRightIS", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIS");
}
@Test
public void rightITShouldBeSufficientToPerformAppendOfDeletedMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"));
- scriptTest("aclIntegration/ACLIntegrationRightIT", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIT");
}
@Test
public void rightIWShouldBeSufficientToPerformAppendOfDeletedMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"));
- scriptTest("aclIntegration/ACLIntegrationRightIW", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightIW");
}
@Test
public void rightRSShouldBeSufficientToPerformStoreAndFetchOnSeenMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rs"));
mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- scriptTest("aclIntegration/ACLIntegrationRightRS", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRS");
}
@Test
public void rightSShouldBeNeededToPerformStoreAndFetchOnSeenMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxtcdlake"));
mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- scriptTest("aclIntegration/ACLIntegrationWithoutRightS", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightS");
}
@Test
public void rightRWShouldBeSufficientToPerformStoreOnFlaggedMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rw"));
mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- scriptTest("aclIntegration/ACLIntegrationRightRW", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRW");
}
@Test
public void rightWShouldBeNeededToPerformStoreOnFlaggedMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rsipxtcdlake"));
mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- scriptTest("aclIntegration/ACLIntegrationWithoutRightW", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightW");
}
@Test
public void rightRTShouldBeSufficientToPerformStoreOnDeletedMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rt"));
mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- scriptTest("aclIntegration/ACLIntegrationRightRT", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationRightRT");
}
@Test
public void rightTShouldBeNeededToPerformStoreOnFlaggedMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rwipxslake"));
mailboxMessageAppender.fillMailbox(OTHER_USER_MAILBOX);
- scriptTest("aclIntegration/ACLIntegrationWithoutRightT", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationWithoutRightT");
}
@Test
public void rightIShouldBeSufficientToPerformCopyUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("i"));
mailboxMessageAppender.fillMailbox(MY_INBOX);
- scriptTest("aclIntegration/ACLIntegrationCopyI", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyI");
}
@Test
public void rightIShouldBeNeededToPerformCopyUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rswpxtcdlake"));
mailboxMessageAppender.fillMailbox(MY_INBOX);
- scriptTest("aclIntegration/ACLIntegrationCopyWithoutI", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutI");
}
@Test
public void rightIShouldBeSufficientToPerformOfSeenMessagesCopyUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("ris"));
mailboxMessageAppender.fillMailbox(MY_INBOX);
- scriptTest("aclIntegration/ACLIntegrationCopyIS", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIS");
}
@Test
public void rightSShouldBeNeededToPerformCopyOfSeenMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riwpxtcdlake"));
mailboxMessageAppender.fillMailbox(MY_INBOX);
- scriptTest("aclIntegration/ACLIntegrationCopyWithoutS", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutS");
}
@Test
public void rightIWShouldBeSufficientToPerformOfFlaggedMessagesCopyUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("riw"));
mailboxMessageAppender.fillMailbox(MY_INBOX);
- scriptTest("aclIntegration/ACLIntegrationCopyIW", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIW");
}
@Test
public void rightWShouldBeNeededToPerformCopyOfFlaggedMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxtcdlake"));
mailboxMessageAppender.fillMailbox(MY_INBOX);
- scriptTest("aclIntegration/ACLIntegrationCopyWithoutW", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutW");
}
@Test
public void rightITShouldBeSufficientToPerformOfDeletedMessagesCopyUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rit"));
mailboxMessageAppender.fillMailbox(MY_INBOX);
- scriptTest("aclIntegration/ACLIntegrationCopyIT", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyIT");
}
@Test
public void rightTShouldBeNeededToPerformCopyOfDeletedMessageUS() throws Exception {
grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new SimpleMailboxACL.Rfc4314Rights("rispxwlake"));
mailboxMessageAppender.fillMailbox(MY_INBOX);
- scriptTest("aclIntegration/ACLIntegrationCopyWithoutT", Locale.US);
+ simpleScriptedTestProtocol.run("aclIntegration/ACLIntegrationCopyWithoutT");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
index 6f241bb..b11eca8 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatePlain.java
@@ -26,16 +26,31 @@ import javax.inject.Inject;
import org.apache.james.mailbox.model.MailboxConstants;
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseNonAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class AuthenticatePlain extends BaseNonAuthenticatedState {
+public class AuthenticatePlain implements ImapTestConstants {
@Inject
private static ImapHostSystem system;
- public AuthenticatePlain() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
@@ -43,7 +58,7 @@ public class AuthenticatePlain extends BaseNonAuthenticatedState {
system.addUser("delegate", "123456");
system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
- scriptTest("AuthenticatePlain", Locale.US);
+ simpleScriptedTestProtocol.run("AuthenticatePlain");
}
@Test
@@ -51,7 +66,9 @@ public class AuthenticatePlain extends BaseNonAuthenticatedState {
system.addUser("delegate", "123456");
system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
- scriptTest("AuthenticatePlain", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("AuthenticatePlain");
}
@Test
@@ -59,6 +76,8 @@ public class AuthenticatePlain extends BaseNonAuthenticatedState {
system.addUser("delegate", "123456");
system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "delegate", "delegate"));
system.createMailbox(new MailboxPath(MailboxConstants.USER_NAMESPACE, "imapuser", "imapuser"));
- scriptTest("AuthenticatePlain", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("AuthenticatePlain");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
index c6680e1..45bafa6 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/AuthenticatedState.java
@@ -26,341 +26,441 @@ import javax.inject.Inject;
import org.apache.james.mailbox.model.MailboxPath;
import org.apache.james.mpt.api.ImapFeatures.Feature;
import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Assume;
+import org.junit.Before;
import org.junit.Test;
-public class AuthenticatedState extends BaseAuthenticatedState {
+public class AuthenticatedState extends BasicImapCommands {
@Inject
private static ImapHostSystem system;
- public AuthenticatedState() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testNoopUS() throws Exception {
- scriptTest("Noop", Locale.US);
+ simpleScriptedTestProtocol.run("Noop");
}
@Test
public void testLogoutUS() throws Exception {
- scriptTest("Logout", Locale.US);
+ simpleScriptedTestProtocol.run("Logout");
}
@Test
public void testCapabilityUS() throws Exception {
- scriptTest("Capability", Locale.US);
+ simpleScriptedTestProtocol.run("Capability");
}
@Test
public void testAppendExamineInboxUS() throws Exception {
- scriptTest("AppendExamineInbox", Locale.US);
+ simpleScriptedTestProtocol.run("AppendExamineInbox");
}
@Test
public void testAppendSelectInboxUS() throws Exception {
- scriptTest("AppendSelectInbox", Locale.US);
+ simpleScriptedTestProtocol.run("AppendSelectInbox");
}
@Test
public void testCreateUS() throws Exception {
- scriptTest("Create", Locale.US);
+ simpleScriptedTestProtocol.run("Create");
}
@Test
public void testExamineEmptyUS() throws Exception {
- scriptTest("ExamineEmpty", Locale.US);
+ simpleScriptedTestProtocol.run("ExamineEmpty");
}
@Test
public void testSelectEmptyUS() throws Exception {
- scriptTest("SelectEmpty", Locale.US);
+ simpleScriptedTestProtocol.run("SelectEmpty");
}
@Test
public void testListNamespaceUS() throws Exception {
- scriptTest("ListNamespace", Locale.US);
+ simpleScriptedTestProtocol.run("ListNamespace");
}
@Test
public void testListMailboxesUS() throws Exception {
- scriptTest("ListMailboxes", Locale.US);
+ simpleScriptedTestProtocol.run("ListMailboxes");
}
@Test
public void testStatusUS() throws Exception {
- scriptTest("Status", Locale.US);
+ simpleScriptedTestProtocol.run("Status");
}
@Test
public void testSubscribeUS() throws Exception {
- scriptTest("Subscribe", Locale.US);
+ simpleScriptedTestProtocol.run("Subscribe");
}
@Test
public void testDeleteUS() throws Exception {
- scriptTest("Delete", Locale.US);
+ simpleScriptedTestProtocol.run("Delete");
}
@Test
public void testAppendUS() throws Exception {
- scriptTest("Append", Locale.US);
+ simpleScriptedTestProtocol.run("Append");
}
@Test
public void testAppendExpungeUS() throws Exception {
- scriptTest("AppendExpunge", Locale.US);
+ simpleScriptedTestProtocol.run("AppendExpunge");
}
@Test
public void testSelectAppendUS() throws Exception {
- scriptTest("SelectAppend", Locale.US);
+ simpleScriptedTestProtocol.run("SelectAppend");
}
@Test
public void testStringArgsUS() throws Exception {
- scriptTest("StringArgs", Locale.US);
+ simpleScriptedTestProtocol.run("StringArgs");
}
@Test
public void testValidNonAuthenticatedUS() throws Exception {
- scriptTest("ValidNonAuthenticated", Locale.US);
+ simpleScriptedTestProtocol.run("ValidNonAuthenticated");
}
@Test
public void testNoopITALY() throws Exception {
- scriptTest("Noop", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Noop");
}
@Test
public void testLogoutITALY() throws Exception {
- scriptTest("Logout", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY).run("Logout");
}
@Test
public void testCapabilityITALY() throws Exception {
- scriptTest("Capability", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Capability");
}
@Test
public void testAppendExamineInboxITALY() throws Exception {
- scriptTest("AppendExamineInbox", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("AppendExamineInbox");
}
@Test
public void testAppendSelectInboxITALY() throws Exception {
- scriptTest("AppendSelectInbox", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("AppendSelectInbox");
}
@Test
public void testCreateITALY() throws Exception {
- scriptTest("Create", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Create");
}
@Test
public void testExamineEmptyITALY() throws Exception {
- scriptTest("ExamineEmpty", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ExamineEmpty");
}
@Test
public void testSelectEmptyITALY() throws Exception {
- scriptTest("SelectEmpty", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("SelectEmpty");
}
@Test
public void testListNamespaceITALY() throws Exception {
- scriptTest("ListNamespace", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ListNamespace");
}
@Test
public void testListMailboxesITALY() throws Exception {
- scriptTest("ListMailboxes", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ListMailboxes");
}
@Test
public void testStatusITALY() throws Exception {
- scriptTest("Status", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Status");
}
@Test
public void testSubscribeITALY() throws Exception {
- scriptTest("Subscribe", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Subscribe");
}
@Test
public void testDeleteITALY() throws Exception {
- scriptTest("Delete", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Delete");
}
@Test
public void testAppendITALY() throws Exception {
- scriptTest("Append", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Append");
}
@Test
public void testAppendExpungeITALY() throws Exception {
- scriptTest("AppendExpunge", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("AppendExpunge");
}
@Test
public void testSelectAppendITALY() throws Exception {
- scriptTest("SelectAppend", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("SelectAppend");
}
@Test
public void testStringArgsITALY() throws Exception {
- scriptTest("StringArgs", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("StringArgs");
}
@Test
public void testValidNonAuthenticatedITALY() throws Exception {
- scriptTest("ValidNonAuthenticated", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ValidNonAuthenticated");
}
@Test
public void testNoopKOREA() throws Exception {
- scriptTest("Noop", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Noop");
}
@Test
public void testLogoutKOREA() throws Exception {
- scriptTest("Logout", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Logout");
}
@Test
public void testCapabilityKOREA() throws Exception {
- scriptTest("Capability", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Capability");
}
@Test
public void testAppendExamineInboxKOREA() throws Exception {
- scriptTest("AppendExamineInbox", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("AppendExamineInbox");
}
@Test
public void testAppendSelectInboxKOREA() throws Exception {
- scriptTest("AppendSelectInbox", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("AppendSelectInbox");
}
@Test
public void testCreateKOREA() throws Exception {
- scriptTest("Create", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Create");
}
@Test
public void testExamineEmptyKOREA() throws Exception {
- scriptTest("ExamineEmpty", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ExamineEmpty");
}
@Test
public void testSelectEmptyKOREA() throws Exception {
- scriptTest("SelectEmpty", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("SelectEmpty");
}
@Test
public void testListNamespaceKOREA() throws Exception {
- scriptTest("ListNamespace", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ListNamespace");
}
@Test
public void testListMailboxesKOREA() throws Exception {
- scriptTest("ListMailboxes", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ListMailboxes");
}
@Test
public void testStatusKOREA() throws Exception {
- scriptTest("Status", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Status");
}
@Test
public void testSubscribeKOREA() throws Exception {
- scriptTest("Subscribe", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Subscribe");
}
@Test
public void testDeleteKOREA() throws Exception {
- scriptTest("Delete", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Delete");
}
@Test
public void testAppendKOREA() throws Exception {
- scriptTest("Append", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Append");
}
@Test
public void testAppendExpungeKOREA() throws Exception {
- scriptTest("AppendExpunge", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("AppendExpunge");
}
@Test
public void testSelectAppendKOREA() throws Exception {
- scriptTest("SelectAppend", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("SelectAppend");
}
@Test
public void testStringArgsKOREA() throws Exception {
- scriptTest("StringArgs", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("StringArgs");
}
@Test
public void testValidNonAuthenticatedKOREA() throws Exception {
- scriptTest("ValidNonAuthenticated", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ValidNonAuthenticated");
}
@Test
public void testNamespaceUS() throws Exception {
- scriptTest("Namespace", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Namespace");
}
@Test
public void testNamespaceITALY() throws Exception {
- scriptTest("Namespace", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("Namespace");
}
@Test
public void testNamespaceKOREA() throws Exception {
- scriptTest("Namespace", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("Namespace");
}
@Test
public void listShouldNotListMailboxWithOtherNamspaceUS() throws Exception {
Assume.assumeTrue(system.supports(Feature.NAMESPACE_SUPPORT));
system.createMailbox(new MailboxPath("#namespace", USER, "Other"));
- scriptTest("ListMailboxes", Locale.US);
+ simpleScriptedTestProtocol.run("ListMailboxes");
}
@Test
public void listShouldNotListMailboxWithOtherNamspaceITALY() throws Exception {
Assume.assumeTrue(system.supports(Feature.NAMESPACE_SUPPORT));
system.createMailbox(new MailboxPath("#namespace", USER, "Other"));
- scriptTest("ListMailboxes", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ListMailboxes");
}
@Test
public void listShouldNotListMailboxWithOtherNamspaceKOREA() throws Exception {
Assume.assumeTrue(system.supports(Feature.NAMESPACE_SUPPORT));
system.createMailbox(new MailboxPath("#namespace", USER, "Other"));
- scriptTest("ListMailboxes", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ListMailboxes");
}
@Test
public void listShouldNotListMailboxWithOtherUserUS() throws Exception {
system.createMailbox(new MailboxPath("#namespace", USER + "2", "Other"));
- scriptTest("ListMailboxes", Locale.US);
+ simpleScriptedTestProtocol.run("ListMailboxes");
}
@Test
public void listShouldNotListMailboxWithOtherUserITALY() throws Exception {
system.createMailbox(new MailboxPath("#namespace", USER + "2", "Other"));
- scriptTest("ListMailboxes", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ListMailboxes");
}
@Test
public void listShouldNotListMailboxWithOtherUserKOREA() throws Exception {
system.createMailbox(new MailboxPath("#namespace", USER + "2", "Other"));
- scriptTest("ListMailboxes", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ListMailboxes");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
index 4a55ed1..6945e94 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ConcurrentSessions.java
@@ -24,130 +24,191 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class ConcurrentSessions extends BaseAuthenticatedState {
+public class ConcurrentSessions implements ImapTestConstants {
@Inject
private static HostSystem system;
- public ConcurrentSessions() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
@Test
public void testConcurrentExpungeResponseUS() throws Exception {
- scriptTest("ConcurrentExpungeResponse", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentExpungeResponse");
}
@Test
public void testConcurrentExpungeResponseITALY() throws Exception {
- scriptTest("ConcurrentExpungeResponse", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ConcurrentExpungeResponse");
}
@Test
public void testConcurrentExpungeResponseKOREA() throws Exception {
- scriptTest("ConcurrentExpungeResponse", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ConcurrentExpungeResponse");
}
@Test
public void testConcurrentCrossExpungeUS() throws Exception {
- scriptTest("ConcurrentCrossExpunge", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentCrossExpunge");
}
@Test
public void testConcurrentCrossExpungeITALY() throws Exception {
- scriptTest("ConcurrentCrossExpunge", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ConcurrentCrossExpunge");
}
@Test
public void testConcurrentCrossExpungeKOREA() throws Exception {
- scriptTest("ConcurrentCrossExpunge", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ConcurrentCrossExpunge");
}
@Test
public void testConcurrentRenameSelectedSubUS() throws Exception {
- scriptTest("ConcurrentRenameSelectedSub", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentRenameSelectedSub");
}
@Test
public void testConcurrentExistsResponseUS() throws Exception {
- scriptTest("ConcurrentExistsResponse", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentExistsResponse");
}
@Test
public void testConcurrentDeleteSelectedUS() throws Exception {
- scriptTest("ConcurrentDeleteSelected", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentDeleteSelected");
}
@Test
public void testConcurrentFetchResponseUS() throws Exception {
- scriptTest("ConcurrentFetchResponse", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentFetchResponse");
}
@Test
public void testConcurrentRenameSelectedUS() throws Exception {
- scriptTest("ConcurrentRenameSelected", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentRenameSelected");
}
@Test
public void testConcurrentRenameSelectedSubKOREA() throws Exception {
- scriptTest("ConcurrentRenameSelectedSub", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ConcurrentRenameSelectedSub");
}
@Test
public void testConcurrentExistsResponseKOREA() throws Exception {
- scriptTest("ConcurrentExistsResponse", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ConcurrentExistsResponse");
}
@Test
public void testConcurrentDeleteSelectedKOREA() throws Exception {
- scriptTest("ConcurrentDeleteSelected", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ConcurrentDeleteSelected");
}
@Test
public void testConcurrentFetchResponseKOREA() throws Exception {
- scriptTest("ConcurrentFetchResponse", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ConcurrentFetchResponse");
}
@Test
public void testConcurrentRenameSelectedKOREA() throws Exception {
- scriptTest("ConcurrentRenameSelected", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ConcurrentRenameSelected");
}
@Test
public void testConcurrentRenameSelectedSubITALY() throws Exception {
- scriptTest("ConcurrentRenameSelectedSub", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ConcurrentRenameSelectedSub");
}
@Test
public void testConcurrentExistsResponseITALY() throws Exception {
- scriptTest("ConcurrentExistsResponse", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ConcurrentExistsResponse");
}
@Test
public void testConcurrentDeleteSelectedITALY() throws Exception {
- scriptTest("ConcurrentDeleteSelected", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ConcurrentDeleteSelected");
}
@Test
public void testConcurrentFetchResponseITALY() throws Exception {
- scriptTest("ConcurrentFetchResponse", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ConcurrentFetchResponse");
}
@Test
public void testConcurrentRenameSelectedITALY() throws Exception {
- scriptTest("ConcurrentRenameSelected", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ConcurrentRenameSelected");
}
@Test
public void expungeShouldNotBreakUIDToMSNMapping() throws Exception {
- scriptTest("ConcurrentExpungeUIDToMSNMapping", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentExpungeUIDToMSNMapping");
}
@Test
public void appendShouldNotBreakUIDToMSNMapping() throws Exception {
- scriptTest("ConcurrentAppendUIDToMSNMapping", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ConcurrentAppendUIDToMSNMapping");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
index 73caef5..0336638 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
@@ -25,33 +25,44 @@ import javax.inject.Inject;
import org.apache.james.imap.api.ImapConfiguration;
import org.apache.james.mpt.host.JamesImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
import org.junit.Test;
-public class Condstore extends BaseAuthenticatedState {
+public class Condstore implements ImapTestConstants {
@Inject
private static JamesImapHostSystem system;
- public Condstore() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(TO_ADDRESS, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
+
@Test
public void condstoreShouldBeDisableByDefault() throws Exception {
system.configure(ImapConfiguration.builder().build());
- scriptTest("CondstoreDisable", Locale.US);
+ simpleScriptedTestProtocol.run("CondstoreDisable");
}
@Test
public void condstoreShouldBeDisableWhenGivenAndFalse() throws Exception {
system.configure(ImapConfiguration.builder().isCondstoreEnable(false).build());
- scriptTest("CondstoreDisable", Locale.US);
+ simpleScriptedTestProtocol.run("CondstoreDisable");
}
@Test
public void condstoreShouldBeEnableWhenGivenAndTrue() throws Exception {
system.configure(ImapConfiguration.builder().isCondstoreEnable(true).build());
- scriptTest("CondstoreEnable", Locale.US);
+ simpleScriptedTestProtocol.run("CondstoreEnable");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
index 339be7f..81f62f9 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Copy.java
@@ -24,20 +24,30 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
import org.junit.Test;
-public class Copy extends BaseSelectedState {
+public class Copy implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Copy() throws Exception {
- super(system);
- }
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
@Test
public void copyCommandShouldRespectTheRFC() throws Exception {
- scriptTest("Copy", Locale.US);
+ simpleScriptedTestProtocol.run("Copy");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
index 304709d..b92ac5f 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/DeploymentValidation.java
@@ -19,33 +19,40 @@
package org.apache.james.mpt.imapmailbox.suite;
-import javax.inject.Inject;
import java.util.Locale;
+import javax.inject.Inject;
+
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseImapProtocol;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
import org.junit.Test;
-public class DeploymentValidation extends BaseImapProtocol {
+public class DeploymentValidation implements ImapTestConstants {
public static final String DOMAIN = "domain";
- public static final String USER = "imapuser@" + DOMAIN;
@Inject
private static HostSystem system;
+ public static final String USER = "imapuser";
+ public static final String PASSWORD = "password";
- public DeploymentValidation() throws Exception {
- super(system);
- }
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
- @Override
+ @Before
public void setUp() throws Exception {
-
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER + "@" + DOMAIN, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
}
-
+
@Test
public void validateDeployment() throws Exception {
- scriptTest("ValidateDeployment", Locale.US);
+ simpleScriptedTestProtocol.run("ValidateDeployment");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
index 4f220e7..e0470b9 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Events.java
@@ -24,30 +24,53 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class Events extends BaseSelectedState {
+public class Events implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Events() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testAppendToSelectedUS() throws Exception {
- scriptTest("AppendToSelected", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("AppendToSelected");
}
@Test
public void testAppendToSelectedKOREA() throws Exception {
- scriptTest("AppendToSelected", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("AppendToSelected");
}
@Test
public void testAppendToSelectedITALY() throws Exception {
- scriptTest("AppendToSelected", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("AppendToSelected");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
index 4cba7ac..87787f6 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Expunge.java
@@ -24,30 +24,54 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseSelectedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class Expunge extends BaseSelectedState {
+public class Expunge implements ImapTestConstants {
@Inject
private static HostSystem system;
- public Expunge() throws Exception {
- super(system);
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ BasicImapCommands.prepareMailbox(simpleScriptedTestProtocol);
}
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
+ }
+
@Test
public void testBasicExpungeUS() throws Exception {
- scriptTest("ExpungeBasics", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("ExpungeBasics");
}
@Test
public void testBasicExpungeIT() throws Exception {
- scriptTest("ExpungeBasics", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("ExpungeBasics");
}
@Test
public void testBasicExpungeKO() throws Exception {
- scriptTest("ExpungeBasics", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("ExpungeBasics");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[20/21] james-project git commit: MPT-39 Add missing licenses in MPT
Posted by ad...@apache.org.
MPT-39 Add missing licenses in MPT
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/fe60fec8
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/fe60fec8
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/fe60fec8
Branch: refs/heads/master
Commit: fe60fec8b7b0402826abb8d14d46fc7316770f17
Parents: 17ee848
Author: benwa <bt...@linagora.com>
Authored: Mon Jun 26 10:11:02 2017 +0700
Committer: Matthieu Baechler <ma...@apache.org>
Committed: Thu Jul 6 10:32:18 2017 -0400
----------------------------------------------------------------------
.../org/apache/james/mpt/api/Continuation.java | 19 +++++++++++++++++++
.../mpt/script/ImapScriptedTestProtocol.java | 19 +++++++++++++++++++
.../cassandra/CassandraAuthenticatePlain.java | 19 +++++++++++++++++++
.../cassandra/CassandraAuthenticatedState.java | 19 +++++++++++++++++++
.../cassandra/CassandraConcurrentSessions.java | 19 +++++++++++++++++++
.../cassandra/CassandraCondstore.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/cassandra/CassandraCopy.java | 19 +++++++++++++++++++
.../imapmailbox/cassandra/CassandraEvents.java | 19 +++++++++++++++++++
.../imapmailbox/cassandra/CassandraExpunge.java | 19 +++++++++++++++++++
.../imapmailbox/cassandra/CassandraFetch.java | 19 +++++++++++++++++++
.../cassandra/CassandraFetchBodySection.java | 19 +++++++++++++++++++
.../cassandra/CassandraFetchBodyStructure.java | 19 +++++++++++++++++++
.../cassandra/CassandraFetchHeaders.java | 19 +++++++++++++++++++
.../imapmailbox/cassandra/CassandraListing.java | 19 +++++++++++++++++++
.../cassandra/CassandraMailboxAnnotation.java | 19 +++++++++++++++++++
.../CassandraMailboxWithLongNameError.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/cassandra/CassandraMove.java | 19 +++++++++++++++++++
.../CassandraNonAuthenticatedState.java | 19 +++++++++++++++++++
.../cassandra/CassandraPartialFetch.java | 19 +++++++++++++++++++
.../cassandra/CassandraQuotaTest.java | 19 +++++++++++++++++++
.../imapmailbox/cassandra/CassandraRename.java | 19 +++++++++++++++++++
.../imapmailbox/cassandra/CassandraSearch.java | 19 +++++++++++++++++++
.../imapmailbox/cassandra/CassandraSecurity.java | 19 +++++++++++++++++++
.../imapmailbox/cassandra/CassandraSelect.java | 19 +++++++++++++++++++
.../cassandra/CassandraSelectedInbox.java | 19 +++++++++++++++++++
.../cassandra/CassandraSelectedState.java | 19 +++++++++++++++++++
.../cassandra/CassandraUidSearch.java | 19 +++++++++++++++++++
.../cassandra/CassandraUidSearchOnIndex.java | 19 +++++++++++++++++++
.../cassandra/CassandraUserFlagsSupport.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/cyrus/CyrusACLCommands.java | 19 +++++++++++++++++++
.../imapmailbox/cyrus/CyrusACLIntegration.java | 19 +++++++++++++++++++
.../cyrus/CyrusMailboxTestModule.java | 19 +++++++++++++++++++
.../ElasticSearchUidSearchOnIndex.java | 19 +++++++++++++++++++
.../james/JamesDeploymentValidation.java | 19 +++++++++++++++++++
.../hbase/HBaseAuthenticatePlain.java | 19 +++++++++++++++++++
.../hbase/HBaseAuthenticatedState.java | 19 +++++++++++++++++++
.../hbase/HBaseConcurrentSessions.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/hbase/HBaseCondstore.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/hbase/HBaseCopy.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/hbase/HBaseEvents.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/hbase/HBaseExpunge.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/hbase/HBaseFetch.java | 19 +++++++++++++++++++
.../imapmailbox/hbase/HBaseFetchBodySection.java | 19 +++++++++++++++++++
.../hbase/HBaseFetchBodyStructure.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/hbase/HBaseFetchHeaders.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/hbase/HBaseListing.java | 19 +++++++++++++++++++
.../hbase/HBaseMailboxAnnotation.java | 19 +++++++++++++++++++
.../hbase/HBaseMailboxTestModule.java | 19 +++++++++++++++++++
.../hbase/HBaseMailboxWithLongNameError.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/hbase/HBaseMove.java | 19 +++++++++++++++++++
.../hbase/HBaseNonAuthenticatedState.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/hbase/HBasePartialFetch.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/hbase/HBaseQuotaTest.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/hbase/HBaseRename.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/hbase/HBaseSearch.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/hbase/HBaseSecurity.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/hbase/HBaseSelect.java | 19 +++++++++++++++++++
.../imapmailbox/hbase/HBaseSelectedInbox.java | 19 +++++++++++++++++++
.../imapmailbox/hbase/HBaseSelectedState.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/hbase/HBaseUidSearch.java | 19 +++++++++++++++++++
.../imapmailbox/hbase/HBaseUidSearchOnIndex.java | 19 +++++++++++++++++++
.../imapmailbox/hbase/HBaseUserFlagsSupport.java | 19 +++++++++++++++++++
.../inmemory/InMemoryAuthenticatePlain.java | 19 +++++++++++++++++++
.../inmemory/InMemoryAuthenticatedState.java | 19 +++++++++++++++++++
.../inmemory/InMemoryConcurrentSessions.java | 19 +++++++++++++++++++
.../imapmailbox/inmemory/InMemoryCondstore.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/inmemory/InMemoryCopy.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/inmemory/InMemoryEvents.java | 19 +++++++++++++++++++
.../imapmailbox/inmemory/InMemoryExpunge.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/inmemory/InMemoryFetch.java | 19 +++++++++++++++++++
.../inmemory/InMemoryFetchBodySection.java | 19 +++++++++++++++++++
.../inmemory/InMemoryFetchBodyStructure.java | 19 +++++++++++++++++++
.../inmemory/InMemoryFetchHeaders.java | 19 +++++++++++++++++++
.../imapmailbox/inmemory/InMemoryListing.java | 19 +++++++++++++++++++
.../inmemory/InMemoryMailboxAnnotation.java | 19 +++++++++++++++++++
.../InMemoryMailboxWithLongNameSuccess.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/inmemory/InMemoryMove.java | 19 +++++++++++++++++++
.../inmemory/InMemoryNonAuthenticatedState.java | 19 +++++++++++++++++++
.../inmemory/InMemoryPartialFetch.java | 19 +++++++++++++++++++
.../imapmailbox/inmemory/InMemoryQuotaTest.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/inmemory/InMemoryRename.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/inmemory/InMemorySearch.java | 19 +++++++++++++++++++
.../imapmailbox/inmemory/InMemorySecurity.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/inmemory/InMemorySelect.java | 19 +++++++++++++++++++
.../inmemory/InMemorySelectedInbox.java | 19 +++++++++++++++++++
.../inmemory/InMemorySelectedState.java | 19 +++++++++++++++++++
.../imapmailbox/inmemory/InMemoryUidSearch.java | 19 +++++++++++++++++++
.../inmemory/InMemoryUidSearchOnIndex.java | 19 +++++++++++++++++++
.../inmemory/InMemoryUserFlagsSupport.java | 19 +++++++++++++++++++
.../imapmailbox/jpa/JpaAuthenticatePlain.java | 19 +++++++++++++++++++
.../imapmailbox/jpa/JpaAuthenticatedState.java | 19 +++++++++++++++++++
.../imapmailbox/jpa/JpaConcurrentSessions.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaCondstore.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaCopy.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaEvents.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaExpunge.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaFetch.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/jpa/JpaFetchBodySection.java | 19 +++++++++++++++++++
.../imapmailbox/jpa/JpaFetchBodyStructure.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/jpa/JpaFetchHeaders.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaListing.java | 19 +++++++++++++++++++
.../imapmailbox/jpa/JpaMailboxAnnotation.java | 19 +++++++++++++++++++
.../jpa/JpaMailboxWithLongNameError.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaMove.java | 19 +++++++++++++++++++
.../jpa/JpaNonAuthenticatedState.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/jpa/JpaPartialFetch.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaQuotaTest.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaRename.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaSearch.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaSecurity.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaSelect.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/jpa/JpaSelectedInbox.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/jpa/JpaSelectedState.java | 19 +++++++++++++++++++
.../james/mpt/imapmailbox/jpa/JpaUidSearch.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/jpa/JpaUidSearchOnIndex.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/jpa/JpaUserFlagsSupport.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneAuthenticatePlain.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneAuthenticatedState.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneConcurrentSessions.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneCondstore.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/lucenesearch/LuceneCopy.java | 19 +++++++++++++++++++
.../imapmailbox/lucenesearch/LuceneEvents.java | 19 +++++++++++++++++++
.../imapmailbox/lucenesearch/LuceneExpunge.java | 19 +++++++++++++++++++
.../imapmailbox/lucenesearch/LuceneFetch.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneFetchBodySection.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneFetchBodyStructure.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneFetchHeaders.java | 19 +++++++++++++++++++
.../imapmailbox/lucenesearch/LuceneListing.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneMailboxAnnotation.java | 19 +++++++++++++++++++
.../LuceneMailboxWithLongNameError.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/lucenesearch/LuceneMove.java | 19 +++++++++++++++++++
.../LuceneNonAuthenticatedState.java | 19 +++++++++++++++++++
.../lucenesearch/LucenePartialFetch.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneQuotaTest.java | 19 +++++++++++++++++++
.../imapmailbox/lucenesearch/LuceneRename.java | 19 +++++++++++++++++++
.../imapmailbox/lucenesearch/LuceneSearch.java | 19 +++++++++++++++++++
.../imapmailbox/lucenesearch/LuceneSecurity.java | 19 +++++++++++++++++++
.../imapmailbox/lucenesearch/LuceneSelect.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneSelectedInbox.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneSelectedState.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneUidSearch.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneUidSearchOnIndex.java | 19 +++++++++++++++++++
.../lucenesearch/LuceneUserFlagsSupport.java | 19 +++++++++++++++++++
.../maildir/MaildirAuthenticatePlain.java | 19 +++++++++++++++++++
.../maildir/MaildirAuthenticatedState.java | 19 +++++++++++++++++++
.../maildir/MaildirConcurrentSessions.java | 19 +++++++++++++++++++
.../imapmailbox/maildir/MaildirCondstore.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirCopy.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirEvents.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirExpunge.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirFetch.java | 19 +++++++++++++++++++
.../maildir/MaildirFetchBodySection.java | 19 +++++++++++++++++++
.../maildir/MaildirFetchBodyStructure.java | 19 +++++++++++++++++++
.../imapmailbox/maildir/MaildirFetchHeaders.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirListing.java | 19 +++++++++++++++++++
.../maildir/MaildirMailboxAnnotation.java | 19 +++++++++++++++++++
.../maildir/MaildirMailboxWithLongNameError.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirMove.java | 19 +++++++++++++++++++
.../maildir/MaildirNonAuthenticatedState.java | 19 +++++++++++++++++++
.../imapmailbox/maildir/MaildirPartialFetch.java | 19 +++++++++++++++++++
.../imapmailbox/maildir/MaildirQuotaTest.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirRename.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirSearch.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirSecurity.java | 19 +++++++++++++++++++
.../mpt/imapmailbox/maildir/MaildirSelect.java | 19 +++++++++++++++++++
.../maildir/MaildirSelectedInbox.java | 19 +++++++++++++++++++
.../maildir/MaildirSelectedState.java | 19 +++++++++++++++++++
.../imapmailbox/maildir/MaildirUidSearch.java | 19 +++++++++++++++++++
.../maildir/MaildirUidSearchOnIndex.java | 19 +++++++++++++++++++
.../maildir/MaildirUserFlagsSupport.java | 19 +++++++++++++++++++
170 files changed, 3230 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/core/src/main/java/org/apache/james/mpt/api/Continuation.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/api/Continuation.java b/mpt/core/src/main/java/org/apache/james/mpt/api/Continuation.java
index be1ecde..0675efa 100644
--- a/mpt/core/src/main/java/org/apache/james/mpt/api/Continuation.java
+++ b/mpt/core/src/main/java/org/apache/james/mpt/api/Continuation.java
@@ -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.api;
public interface Continuation {
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java b/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java
index f2ca8ff..cc11c0e 100644
--- a/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java
+++ b/mpt/core/src/main/java/org/apache/james/mpt/script/ImapScriptedTestProtocol.java
@@ -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.script;
import org.apache.james.mailbox.model.MailboxPath;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java
index 36a7d4f..a86c2a1 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatePlain.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java
index 723aefc..4a0b277 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraAuthenticatedState.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java
index 5dba708..53963af 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraConcurrentSessions.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
index 5fb4727..38666f6 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
@@ -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.host.JamesImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java
index 4e55db3..298593f 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCopy.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java
index bef1471..1632fd7 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraEvents.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java
index 856529a..ef30799 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraExpunge.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java
index 2b2c203..c8f2eec 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetch.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java
index 4cb3bc8..67fd6ad 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodySection.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java
index 35573d9..c9e2cd7 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchBodyStructure.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java
index 2edc494..bd8c1e6 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraFetchHeaders.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java
index 70e0845..983ff29 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraListing.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java
index 118acc3..1072e24 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxAnnotation.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java
index 1773a58..920f422 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxWithLongNameError.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java
index 51ad3ad..178af1f 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMove.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java
index f05b5e8..24760b4 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraNonAuthenticatedState.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java
index 53978ac..3f9d163 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraPartialFetch.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java
index 6054655..8957a7b 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraQuotaTest.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java
index 61a031f..00459aa 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraRename.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java
index e7c1391..cbfa080 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSearch.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java
index d73df8f..f647f36 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSecurity.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java
index 71c21d9..0563e8e 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelect.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java
index 00f0741..ab53bbf 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedInbox.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java
index a933859..5d31780 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraSelectedState.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java
index c3c0836..a6a9887 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearch.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java
index 3859e45..e35abfe 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUidSearchOnIndex.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java
index 9f68003..2087953 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraUserFlagsSupport.java
@@ -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.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
index a392ec8..b00dbda 100644
--- a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLCommands.java
@@ -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.cyrus;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
index d0ca3c4..51f5aa6 100644
--- a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusACLIntegration.java
@@ -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.cyrus;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java
index 3b3b5a1..64f236c 100644
--- a/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java
+++ b/mpt/impl/imap-mailbox/cyrus/src/test/java/org/apache/james/mpt/imapmailbox/cyrus/CyrusMailboxTestModule.java
@@ -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.cyrus;
import org.apache.james.mpt.api.HostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
index e3fbde8..caa354e 100644
--- a/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/elasticsearch/src/test/java/org/apache/james/mpt/imapmailbox/elasticsearch/ElasticSearchUidSearchOnIndex.java
@@ -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.elasticsearch;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
index 3ab0e9d..f223ab7 100644
--- a/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
+++ b/mpt/impl/imap-mailbox/external-james/src/test/java/org/apache/james/mpt/imapmailbox/external/james/JamesDeploymentValidation.java
@@ -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.external.james;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
index 9779470..787b1ea 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatePlain.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe60fec8/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
index d0c087e..fafa024 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseAuthenticatedState.java
@@ -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.hbase;
import org.apache.james.mpt.api.ImapHostSystem;
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[21/21] james-project git commit: Merge remote-tracking branch
'mbaechler/MPT-39'
Posted by ad...@apache.org.
Merge remote-tracking branch 'mbaechler/MPT-39'
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/3a70ae82
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/3a70ae82
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/3a70ae82
Branch: refs/heads/master
Commit: 3a70ae82d780e3ed76088d376cfeb60868bdc47a
Parents: f2cca21 fe60fec
Author: Antoine Duprat <ad...@linagora.com>
Authored: Fri Jul 7 10:23:48 2017 +0200
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Fri Jul 7 10:23:48 2017 +0200
----------------------------------------------------------------------
.../org/apache/james/mpt/api/Continuation.java | 19 +
.../script/AbstractProtocolTestFramework.java | 115 -----
.../AbstractSimpleScriptedTestProtocol.java | 111 -----
.../GenericSimpleScriptedTestProtocol.java | 206 +++++++++
.../mpt/script/ImapScriptedTestProtocol.java | 49 ++
.../mpt/script/SimpleScriptedTestProtocol.java | 11 +
.../cassandra/CassandraAuthenticatePlain.java | 51 +++
.../cassandra/CassandraAuthenticatedState.java | 51 +++
.../cassandra/CassandraConcurrentSessions.java | 51 +++
.../cassandra/CassandraCondstore.java | 51 +++
.../imapmailbox/cassandra/CassandraCopy.java | 51 +++
.../imapmailbox/cassandra/CassandraEvents.java | 51 +++
.../imapmailbox/cassandra/CassandraExpunge.java | 51 +++
.../imapmailbox/cassandra/CassandraFetch.java | 51 +++
.../cassandra/CassandraFetchBodySection.java | 51 +++
.../cassandra/CassandraFetchBodyStructure.java | 51 +++
.../cassandra/CassandraFetchHeaders.java | 51 +++
.../imapmailbox/cassandra/CassandraListing.java | 51 +++
.../cassandra/CassandraMailboxAnnotation.java | 51 +++
.../cassandra/CassandraMailboxTest.java | 79 ----
.../cassandra/CassandraMailboxTestModule.java | 6 +-
.../CassandraMailboxWithLongNameError.java | 51 +++
.../imapmailbox/cassandra/CassandraMove.java | 51 +++
.../CassandraNonAuthenticatedState.java | 51 +++
.../cassandra/CassandraPartialFetch.java | 51 +++
.../cassandra/CassandraQuotaTest.java | 51 +++
.../imapmailbox/cassandra/CassandraRename.java | 51 +++
.../imapmailbox/cassandra/CassandraSearch.java | 51 +++
.../cassandra/CassandraSecurity.java | 51 +++
.../imapmailbox/cassandra/CassandraSelect.java | 51 +++
.../cassandra/CassandraSelectedInbox.java | 51 +++
.../cassandra/CassandraSelectedState.java | 51 +++
.../cassandra/CassandraUidSearch.java | 51 +++
.../cassandra/CassandraUidSearchOnIndex.java | 51 +++
.../cassandra/CassandraUserFlagsSupport.java | 51 +++
.../cassandra/host/CassandraHostSystem.java | 16 +-
mpt/impl/imap-mailbox/core/pom.xml | 4 -
.../mpt/imapmailbox/AbstractMailboxTest.java | 76 ----
.../mpt/imapmailbox/suite/ACLCommands.java | 67 ++-
.../mpt/imapmailbox/suite/ACLIntegration.java | 233 ++++++----
.../suite/ACLScriptedTestProtocol.java | 82 ++++
.../imapmailbox/suite/AuthenticatePlain.java | 49 +-
.../imapmailbox/suite/AuthenticatedState.java | 238 +++++++---
.../imapmailbox/suite/ConcurrentSessions.java | 120 +++--
.../james/mpt/imapmailbox/suite/Condstore.java | 32 +-
.../james/mpt/imapmailbox/suite/Copy.java | 32 +-
.../imapmailbox/suite/DeploymentValidation.java | 32 +-
.../james/mpt/imapmailbox/suite/Events.java | 40 +-
.../james/mpt/imapmailbox/suite/Expunge.java | 42 +-
.../james/mpt/imapmailbox/suite/Fetch.java | 126 ++++--
.../mpt/imapmailbox/suite/FetchBodySection.java | 64 ++-
.../imapmailbox/suite/FetchBodyStructure.java | 76 +++-
.../mpt/imapmailbox/suite/FetchHeaders.java | 52 ++-
.../james/mpt/imapmailbox/suite/Listing.java | 50 +-
.../imapmailbox/suite/MailboxAnnotation.java | 40 +-
.../suite/MailboxWithLongNameError.java | 35 +-
.../suite/MailboxWithLongNameSuccess.java | 36 +-
.../james/mpt/imapmailbox/suite/Move.java | 36 +-
.../suite/NonAuthenticatedState.java | 112 +++--
.../mpt/imapmailbox/suite/PartialFetch.java | 78 +++-
.../james/mpt/imapmailbox/suite/QuotaTest.java | 43 +-
.../james/mpt/imapmailbox/suite/Rename.java | 66 ++-
.../james/mpt/imapmailbox/suite/Search.java | 53 ++-
.../james/mpt/imapmailbox/suite/Security.java | 112 +++--
.../james/mpt/imapmailbox/suite/Select.java | 41 +-
.../mpt/imapmailbox/suite/SelectedInbox.java | 198 +++++---
.../mpt/imapmailbox/suite/SelectedState.java | 150 ++++--
.../james/mpt/imapmailbox/suite/UidSearch.java | 51 ++-
.../mpt/imapmailbox/suite/UidSearchOnIndex.java | 38 +-
.../mpt/imapmailbox/suite/UserFlagsSupport.java | 34 +-
.../suite/base/BaseAuthenticatedState.java | 85 ----
.../suite/base/BaseImapProtocol.java | 39 --
.../suite/base/BaseNonAuthenticatedState.java | 59 ---
.../suite/base/BaseSelectedInbox.java | 75 ---
.../suite/base/BaseSelectedState.java | 64 ---
.../suite/base/BasicImapCommands.java | 69 +++
.../james/imap/scripts/CondstoreDisable.test | 3 +-
.../mpt/imapmailbox/cyrus/CyrusACLCommands.java | 60 +++
.../imapmailbox/cyrus/CyrusACLIntegration.java | 68 +++
.../mpt/imapmailbox/cyrus/CyrusMailboxTest.java | 54 ---
.../cyrus/CyrusMailboxTestModule.java | 19 +
.../elasticsearch/ElasticSearchMailboxTest.java | 34 --
.../ElasticSearchUidSearchOnIndex.java | 52 +++
.../external/james/ExternalJamesTest.java | 36 --
.../james/JamesDeploymentValidation.java | 53 +++
.../hbase/HBaseAuthenticatePlain.java | 51 +++
.../hbase/HBaseAuthenticatedState.java | 51 +++
.../hbase/HBaseConcurrentSessions.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseCondstore.java | 51 +++
.../james/mpt/imapmailbox/hbase/HBaseCopy.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseEvents.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseExpunge.java | 51 +++
.../james/mpt/imapmailbox/hbase/HBaseFetch.java | 51 +++
.../hbase/HBaseFetchBodySection.java | 51 +++
.../hbase/HBaseFetchBodyStructure.java | 51 +++
.../imapmailbox/hbase/HBaseFetchHeaders.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseListing.java | 51 +++
.../hbase/HBaseMailboxAnnotation.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseMailboxTest.java | 9 -
.../hbase/HBaseMailboxTestModule.java | 25 +-
.../hbase/HBaseMailboxWithLongNameError.java | 51 +++
.../james/mpt/imapmailbox/hbase/HBaseMove.java | 51 +++
.../hbase/HBaseNonAuthenticatedState.java | 51 +++
.../imapmailbox/hbase/HBasePartialFetch.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseQuotaTest.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseRename.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseSearch.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseSecurity.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseSelect.java | 51 +++
.../imapmailbox/hbase/HBaseSelectedInbox.java | 51 +++
.../imapmailbox/hbase/HBaseSelectedState.java | 51 +++
.../mpt/imapmailbox/hbase/HBaseUidSearch.java | 51 +++
.../hbase/HBaseUidSearchOnIndex.java | 51 +++
.../hbase/HBaseUserFlagsSupport.java | 51 +++
.../inmemory/InMemoryAuthenticatePlain.java | 51 +++
.../inmemory/InMemoryAuthenticatedState.java | 51 +++
.../inmemory/InMemoryConcurrentSessions.java | 51 +++
.../imapmailbox/inmemory/InMemoryCondstore.java | 51 +++
.../mpt/imapmailbox/inmemory/InMemoryCopy.java | 51 +++
.../imapmailbox/inmemory/InMemoryEvents.java | 51 +++
.../imapmailbox/inmemory/InMemoryExpunge.java | 51 +++
.../mpt/imapmailbox/inmemory/InMemoryFetch.java | 51 +++
.../inmemory/InMemoryFetchBodySection.java | 51 +++
.../inmemory/InMemoryFetchBodyStructure.java | 51 +++
.../inmemory/InMemoryFetchHeaders.java | 51 +++
.../imapmailbox/inmemory/InMemoryListing.java | 51 +++
.../inmemory/InMemoryMailboxAnnotation.java | 51 +++
.../InMemoryMailboxEventAsynchronousTest.java | 70 ---
...emoryMailboxEventAsynchronousTestModule.java | 42 --
.../inmemory/InMemoryMailboxTest.java | 80 ----
.../InMemoryMailboxWithLongNameSuccess.java | 51 +++
.../mpt/imapmailbox/inmemory/InMemoryMove.java | 51 +++
.../inmemory/InMemoryNonAuthenticatedState.java | 51 +++
.../inmemory/InMemoryPartialFetch.java | 51 +++
.../imapmailbox/inmemory/InMemoryQuotaTest.java | 51 +++
.../imapmailbox/inmemory/InMemoryRename.java | 51 +++
.../imapmailbox/inmemory/InMemorySearch.java | 51 +++
.../imapmailbox/inmemory/InMemorySecurity.java | 51 +++
.../imapmailbox/inmemory/InMemorySelect.java | 51 +++
.../inmemory/InMemorySelectedInbox.java | 51 +++
.../inmemory/InMemorySelectedState.java | 51 +++
.../imapmailbox/inmemory/InMemoryUidSearch.java | 51 +++
.../inmemory/InMemoryUidSearchOnIndex.java | 51 +++
.../inmemory/InMemoryUserFlagsSupport.java | 51 +++
.../InMemoryEventAsynchronousHostSystem.java | 132 ------
.../mpt/imapmailbox/jcr/JcrMailboxTest.java | 7 +-
.../imapmailbox/jpa/JpaAuthenticatePlain.java | 51 +++
.../imapmailbox/jpa/JpaAuthenticatedState.java | 51 +++
.../imapmailbox/jpa/JpaConcurrentSessions.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaCondstore.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaCopy.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaEvents.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaExpunge.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaFetch.java | 51 +++
.../imapmailbox/jpa/JpaFetchBodySection.java | 51 +++
.../imapmailbox/jpa/JpaFetchBodyStructure.java | 51 +++
.../mpt/imapmailbox/jpa/JpaFetchHeaders.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaListing.java | 51 +++
.../imapmailbox/jpa/JpaMailboxAnnotation.java | 51 +++
.../mpt/imapmailbox/jpa/JpaMailboxTest.java | 27 --
.../imapmailbox/jpa/JpaMailboxTestModule.java | 4 +-
.../jpa/JpaMailboxWithLongNameError.java | 53 +++
.../james/mpt/imapmailbox/jpa/JpaMove.java | 51 +++
.../jpa/JpaNonAuthenticatedState.java | 51 +++
.../mpt/imapmailbox/jpa/JpaPartialFetch.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaQuotaTest.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaRename.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaSearch.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaSecurity.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaSelect.java | 51 +++
.../mpt/imapmailbox/jpa/JpaSelectedInbox.java | 51 +++
.../mpt/imapmailbox/jpa/JpaSelectedState.java | 51 +++
.../james/mpt/imapmailbox/jpa/JpaUidSearch.java | 51 +++
.../imapmailbox/jpa/JpaUidSearchOnIndex.java | 51 +++
.../imapmailbox/jpa/JpaUserFlagsSupport.java | 51 +++
.../lucenesearch/LuceneAuthenticatePlain.java | 52 +++
.../lucenesearch/LuceneAuthenticatedState.java | 52 +++
.../lucenesearch/LuceneConcurrentSessions.java | 52 +++
.../lucenesearch/LuceneCondstore.java | 52 +++
.../imapmailbox/lucenesearch/LuceneCopy.java | 52 +++
.../imapmailbox/lucenesearch/LuceneEvents.java | 52 +++
.../imapmailbox/lucenesearch/LuceneExpunge.java | 52 +++
.../imapmailbox/lucenesearch/LuceneFetch.java | 52 +++
.../lucenesearch/LuceneFetchBodySection.java | 52 +++
.../lucenesearch/LuceneFetchBodyStructure.java | 52 +++
.../lucenesearch/LuceneFetchHeaders.java | 52 +++
.../imapmailbox/lucenesearch/LuceneListing.java | 52 +++
.../lucenesearch/LuceneMailboxAnnotation.java | 52 +++
.../LuceneMailboxWithLongNameError.java | 54 +++
.../imapmailbox/lucenesearch/LuceneMove.java | 52 +++
.../LuceneNonAuthenticatedState.java | 52 +++
.../lucenesearch/LucenePartialFetch.java | 52 +++
.../lucenesearch/LuceneQuotaTest.java | 52 +++
.../imapmailbox/lucenesearch/LuceneRename.java | 52 +++
.../imapmailbox/lucenesearch/LuceneSearch.java | 52 +++
.../lucenesearch/LuceneSearchMailboxTest.java | 74 ---
.../LuceneSearchMailboxTestModule.java | 6 +-
.../lucenesearch/LuceneSecurity.java | 52 +++
.../imapmailbox/lucenesearch/LuceneSelect.java | 52 +++
.../lucenesearch/LuceneSelectedInbox.java | 52 +++
.../lucenesearch/LuceneSelectedState.java | 52 +++
.../lucenesearch/LuceneUidSearch.java | 52 +++
.../lucenesearch/LuceneUidSearchOnIndex.java | 52 +++
.../lucenesearch/LuceneUserFlagsSupport.java | 52 +++
.../maildir/MaildirAuthenticatePlain.java | 51 +++
.../maildir/MaildirAuthenticatedState.java | 51 +++
.../maildir/MaildirConcurrentSessions.java | 51 +++
.../imapmailbox/maildir/MaildirCondstore.java | 51 +++
.../mpt/imapmailbox/maildir/MaildirCopy.java | 51 +++
.../mpt/imapmailbox/maildir/MaildirEvents.java | 51 +++
.../mpt/imapmailbox/maildir/MaildirExpunge.java | 51 +++
.../mpt/imapmailbox/maildir/MaildirFetch.java | 51 +++
.../maildir/MaildirFetchBodySection.java | 51 +++
.../maildir/MaildirFetchBodyStructure.java | 51 +++
.../maildir/MaildirFetchHeaders.java | 51 +++
.../mpt/imapmailbox/maildir/MaildirListing.java | 51 +++
.../maildir/MaildirMailboxAnnotation.java | 51 +++
.../imapmailbox/maildir/MaildirMailboxTest.java | 27 --
.../maildir/MaildirMailboxTestModule.java | 6 +-
.../MaildirMailboxWithLongNameError.java | 53 +++
.../mpt/imapmailbox/maildir/MaildirMove.java | 51 +++
.../maildir/MaildirNonAuthenticatedState.java | 51 +++
.../maildir/MaildirPartialFetch.java | 51 +++
.../imapmailbox/maildir/MaildirQuotaTest.java | 51 +++
.../mpt/imapmailbox/maildir/MaildirRename.java | 51 +++
.../mpt/imapmailbox/maildir/MaildirSearch.java | 51 +++
.../imapmailbox/maildir/MaildirSecurity.java | 51 +++
.../mpt/imapmailbox/maildir/MaildirSelect.java | 51 +++
.../maildir/MaildirSelectedInbox.java | 51 +++
.../maildir/MaildirSelectedState.java | 51 +++
.../imapmailbox/maildir/MaildirUidSearch.java | 51 +++
.../maildir/MaildirUidSearchOnIndex.java | 51 +++
.../maildir/MaildirUserFlagsSupport.java | 52 +++
.../cassandra/CassandraAuthenticateTest.java | 51 +++
.../cassandra/CassandraCapabilityTest.java | 51 +++
.../cassandra/CassandraCheckScriptTest.java | 51 +++
.../cassandra/CassandraDeleteScriptTest.java | 51 +++
.../cassandra/CassandraGetScriptTest.java | 51 +++
.../cassandra/CassandraHaveSpaceTest.java | 51 +++
.../cassandra/CassandraListScriptsTest.java | 51 +++
.../cassandra/CassandraLogoutTest.java | 50 ++
.../cassandra/CassandraNoopTest.java | 51 +++
.../cassandra/CassandraPutScriptTest.java | 51 +++
.../cassandra/CassandraRenameScriptTest.java | 51 +++
.../cassandra/CassandraSetActiveTest.java | 51 +++
.../cassandra/CassandraStartTlsTest.java | 51 +++
.../cassandra/CassandraUnauthenticatedTest.java | 51 +++
.../cassandra/ManageSieveCassandraTest.java | 60 ---
mpt/impl/managesieve/core/pom.xml | 6 +-
.../james/mpt/testsuite/AuthenticateTest.java | 37 +-
.../james/mpt/testsuite/CapabilityTest.java | 37 +-
.../james/mpt/testsuite/CheckScriptTest.java | 37 +-
.../james/mpt/testsuite/DeleteScriptTest.java | 37 +-
.../james/mpt/testsuite/GetScriptTest.java | 37 +-
.../james/mpt/testsuite/HaveSpaceTest.java | 46 +-
.../james/mpt/testsuite/ListScriptsTest.java | 37 +-
.../apache/james/mpt/testsuite/LogoutTest.java | 37 +-
.../james/mpt/testsuite/ManageSieveMPTTest.java | 33 --
.../apache/james/mpt/testsuite/NoopTest.java | 43 +-
.../james/mpt/testsuite/PutScriptTest.java | 38 +-
.../james/mpt/testsuite/RenameScriptTest.java | 37 +-
.../james/mpt/testsuite/SetActiveTest.java | 37 +-
.../james/mpt/testsuite/StartTlsTest.java | 37 +-
.../mpt/testsuite/UnauthenticatedTest.java | 37 +-
.../managesieve/file/FileAuthenticateTest.java | 51 +++
.../managesieve/file/FileCapabilityTest.java | 51 +++
.../managesieve/file/FileCheckScriptTest.java | 51 +++
.../managesieve/file/FileDeleteScriptTest.java | 51 +++
.../mpt/managesieve/file/FileGetScriptTest.java | 51 +++
.../mpt/managesieve/file/FileHaveSpaceTest.java | 51 +++
.../managesieve/file/FileListScriptsTest.java | 51 +++
.../mpt/managesieve/file/FileLogoutTest.java | 50 ++
.../mpt/managesieve/file/FileNoopTest.java | 51 +++
.../mpt/managesieve/file/FilePutScriptTest.java | 51 +++
.../managesieve/file/FileRenameScriptTest.java | 51 +++
.../mpt/managesieve/file/FileSetActiveTest.java | 51 +++
.../mpt/managesieve/file/FileStartTlsTest.java | 51 +++
.../file/FileUnauthenticatedTest.java | 51 +++
.../managesieve/file/ManageSieveFileTest.java | 60 ---
mpt/impl/smtp/cassandra/pom.xml | 4 -
.../mpt/smtp/CassandraForwardSmtpTest.java | 49 ++
.../smtp/CassandraSmtpStarttlsCommandTest.java | 49 ++
.../org/apache/james/mpt/smtp/SmtpTest.java | 33 --
.../apache/james/mpt/smtp/SmtpTestModule.java | 19 +-
.../apache/james/mpt/smtp/StarttlsSmtpTest.java | 33 --
.../james/mpt/smtp/StarttlsSmtpTestModule.java | 32 --
.../apache/james/mpt/smtp/ForwardSmtpTest.java | 26 +-
.../james/mpt/smtp/SmtpStarttlsCommandTest.java | 35 +-
mpt/onami-test/pom.xml | 80 ----
.../james/mpt/onami/test/GuiceMockModule.java | 157 -------
.../james/mpt/onami/test/MockEngineFactory.java | 62 ---
.../james/mpt/onami/test/OnamiRunner.java | 451 -------------------
.../apache/james/mpt/onami/test/OnamiSuite.java | 409 -----------------
.../mpt/onami/test/annotation/GuiceModules.java | 41 --
.../test/annotation/GuiceProvidedModules.java | 43 --
.../james/mpt/onami/test/annotation/Mock.java | 75 ---
.../onami/test/annotation/MockFramework.java | 39 --
.../mpt/onami/test/annotation/MockObjType.java | 47 --
.../mpt/onami/test/annotation/MockType.java | 38 --
.../onami/test/guice/MockMembersInjector.java | 70 ---
.../mpt/onami/test/guice/MockTypeListener.java | 78 ----
.../handler/GuiceInjectableClassHandler.java | 77 ----
.../onami/test/handler/GuiceModuleHandler.java | 68 ---
.../handler/GuiceProvidedModuleHandler.java | 115 -----
.../test/handler/MockFrameworkHandler.java | 66 ---
.../mpt/onami/test/handler/MockHandler.java | 151 -------
.../james/mpt/onami/test/mock/MockEngine.java | 49 --
.../test/mock/framework/EasyMockFramework.java | 60 ---
.../test/mock/framework/MockitoFramework.java | 52 ---
.../test/reflection/AnnotationHandler.java | 44 --
.../mpt/onami/test/reflection/ClassHandler.java | 31 --
.../mpt/onami/test/reflection/ClassVisitor.java | 101 -----
.../mpt/onami/test/reflection/FieldHandler.java | 32 --
.../onami/test/reflection/HandleException.java | 61 ---
.../onami/test/reflection/MethodHandler.java | 32 --
.../mpt/onami/test/AbstractEmptyTestCase.java | 40 --
.../mpt/onami/test/AbstractMockTestCase.java | 37 --
.../mpt/onami/test/AbstractMockitoTestCase.java | 42 --
.../james/mpt/onami/test/AbstractTestCase.java | 72 ---
.../test/InjectDependingMockObjectTestCase.java | 82 ----
.../test/InjectFromSuperClassTestCase.java | 55 ---
.../test/InjectJSR330ModuleClassTestCase.java | 50 --
.../onami/test/InjectMockObjectTestCase.java | 92 ----
.../onami/test/InjectModuleClassTestCase.java | 50 --
.../onami/test/InjectStaticSimpleTestCase.java | 67 ---
.../james/mpt/onami/test/MockTypeTestCase.java | 41 --
.../onami/test/MockitoFrameworkTestCase.java | 56 ---
.../james/mpt/onami/test/OnamiSuiteTest.java | 29 --
.../mpt/onami/test/ServiceMockProviderTest.java | 41 --
.../apache/james/mpt/onami/test/SimpleTest.java | 53 ---
.../mpt/onami/test/data/ComplexModule.java | 37 --
.../mpt/onami/test/data/HelloWordAnnotated.java | 44 --
.../james/mpt/onami/test/data/HelloWorld.java | 59 ---
.../james/mpt/onami/test/data/Service.java | 28 --
.../james/mpt/onami/test/data/ServiceImpl.java | 32 --
.../onami/test/data/ServiceMockProvider.java | 31 --
.../mpt/onami/test/data/ServiceModule.java | 32 --
.../james/mpt/onami/test/data/SimpleModule.java | 31 --
.../mpt/onami/test/data/TelephonService.java | 26 --
.../onami/test/data/TelephonServiceImpl.java | 29 --
.../mpt/onami/test/data/TestAnnotation.java | 31 --
.../mpt/onami/test/data/TestAnnotation2.java | 31 --
.../apache/james/mpt/onami/test/data/WhoIm.java | 34 --
.../test/guice/MockAnnotatedWithTestCase.java | 73 ---
.../test/guice/TestCustomInjectionTest.java | 78 ----
.../src/test/resources/log4j.properties | 46 --
mpt/pom.xml | 6 -
347 files changed, 12615 insertions(+), 6493 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[15/21] james-project git commit: MPT-39 Reference Apache issue
tracking in source code
Posted by ad...@apache.org.
MPT-39 Reference Apache issue tracking in source code
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/17ee8489
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/17ee8489
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/17ee8489
Branch: refs/heads/master
Commit: 17ee848989f19c2d334bf8767e02d78ed198c806
Parents: ae33676
Author: benwa <bt...@linagora.com>
Authored: Fri Jun 23 10:34:53 2017 +0700
Committer: Matthieu Baechler <ma...@apache.org>
Committed: Thu Jul 6 10:32:18 2017 -0400
----------------------------------------------------------------------
.../java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/17ee8489/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
index 23f474d..afe14d9 100644
--- a/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
+++ b/mpt/impl/imap-mailbox/jcr/src/test/java/org/apache/james/mpt/imapmailbox/jcr/JcrMailboxTest.java
@@ -20,7 +20,7 @@ package org.apache.james.mpt.imapmailbox.jcr;
import org.junit.Ignore;
-@Ignore("JWC-130 : JCR mailbox does not correctly release resources + append problems")
+@Ignore("MPT-7 : JCR mailbox does not correctly release resources + append problems")
public class JcrMailboxTest {
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[14/21] james-project git commit: MPT-39 Re-enable CONDSTORE related
tests
Posted by ad...@apache.org.
MPT-39 Re-enable CONDSTORE related tests
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/6a23a1b2
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/6a23a1b2
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/6a23a1b2
Branch: refs/heads/master
Commit: 6a23a1b2519b2e8abfdf00e5d711933888a680f4
Parents: 78cf06a
Author: benwa <bt...@linagora.com>
Authored: Fri Jun 23 10:21:00 2017 +0700
Committer: Matthieu Baechler <ma...@apache.org>
Committed: Thu Jul 6 10:32:17 2017 -0400
----------------------------------------------------------------------
.../james/mpt/imapmailbox/cassandra/CassandraCondstore.java | 2 --
.../mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java | 6 ++++--
.../java/org/apache/james/mpt/imapmailbox/suite/Condstore.java | 2 +-
.../org/apache/james/imap/scripts/CondstoreDisable.test | 3 ++-
.../org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java | 2 --
.../james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java | 6 ++++--
.../james/mpt/imapmailbox/inmemory/InMemoryCondstore.java | 2 --
.../org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java | 2 --
.../apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java | 4 +++-
.../james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java | 2 --
.../lucenesearch/LuceneSearchMailboxTestModule.java | 6 ++++--
.../apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java | 2 --
.../mpt/imapmailbox/maildir/MaildirMailboxTestModule.java | 6 ++++--
13 files changed, 22 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
index 6e59ec6..5fb4727 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraCondstore.java
@@ -4,12 +4,10 @@ import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.suite.Condstore;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why it was no enabled on cassandra ?")
public class CassandraCondstore extends Condstore {
private JamesImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
index 516de6d..1133302 100644
--- a/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
+++ b/mpt/impl/imap-mailbox/cassandra/src/test/java/org/apache/james/mpt/imapmailbox/cassandra/CassandraMailboxTestModule.java
@@ -21,6 +21,7 @@ package org.apache.james.mpt.imapmailbox.cassandra;
import org.apache.james.mpt.api.HostSystem;
import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.cassandra.host.CassandraHostSystem;
import com.google.inject.AbstractModule;
@@ -31,12 +32,13 @@ public class CassandraMailboxTestModule extends AbstractModule {
@Override
protected void configure() {
- bind(HostSystem.class).to(ImapHostSystem.class);
+ bind(HostSystem.class).to(JamesImapHostSystem.class);
+ bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
}
@Provides
@Singleton
- public ImapHostSystem provideHostSystem() throws Exception {
+ public JamesImapHostSystem provideHostSystem() throws Exception {
return new CassandraHostSystem();
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
index 8ae9864..106e7f2 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Condstore.java
@@ -40,7 +40,7 @@ public abstract class Condstore implements ImapTestConstants {
public void setUp() throws Exception {
system = createJamesImapHostSystem();
simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
- .withUser(TO_ADDRESS, PASSWORD)
+ .withUser(USER, PASSWORD)
.withLocale(Locale.US);
BasicImapCommands.welcome(simpleScriptedTestProtocol);
BasicImapCommands.authenticate(simpleScriptedTestProtocol);
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/CondstoreDisable.test
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/CondstoreDisable.test b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/CondstoreDisable.test
index 3db4cb0..25cd409 100644
--- a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/CondstoreDisable.test
+++ b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/CondstoreDisable.test
@@ -17,7 +17,8 @@
# under the License. #
################################################################
C: A0 CAPABILITY
-S: \* CAPABILITY NAMESPACE QUOTA IMAP4rev1 QRESYNC UNSELECT WITHIN SASL-IR ACL ENABLE SEARCHRES UIDPLUS CHILDREN AUTH=PLAIN LITERAL\+ MOVE ANNOTATION ESEARCH IDLE I18NLEVEL\=1
+# This regex ensure the response string do not contain CONDSTORE string
+S: ^((?!CONDSTORE).)*$
S: A0 OK CAPABILITY completed.
C: A1 ENABLE CONDSTORE
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
index 3781b03..a21b14c 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseCondstore.java
@@ -4,12 +4,10 @@ import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.suite.Condstore;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why it was no enabled on cassandra ?")
public class HBaseCondstore extends Condstore {
private JamesImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
index eecfaa3..40d9c3d 100644
--- a/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
+++ b/mpt/impl/imap-mailbox/hbase/src/test/java/org/apache/james/mpt/imapmailbox/hbase/HBaseMailboxTestModule.java
@@ -2,6 +2,7 @@ package org.apache.james.mpt.imapmailbox.hbase;
import org.apache.james.mpt.api.HostSystem;
import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.hbase.host.HBaseHostSystem;
import com.google.inject.AbstractModule;
@@ -12,12 +13,13 @@ public class HBaseMailboxTestModule extends AbstractModule {
@Override
protected void configure() {
- bind(HostSystem.class).to(ImapHostSystem.class);
+ bind(HostSystem.class).to(JamesImapHostSystem.class);
+ bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
}
@Provides
@Singleton
- public ImapHostSystem provideHostSystem() throws Exception {
+ public JamesImapHostSystem provideHostSystem() throws Exception {
return HBaseHostSystem.build();
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
index be72a68..8b4f625 100644
--- a/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
+++ b/mpt/impl/imap-mailbox/inmemory/src/test/java/org/apache/james/mpt/imapmailbox/inmemory/InMemoryCondstore.java
@@ -4,12 +4,10 @@ import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.suite.Condstore;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why it was no enabled on cassandra ?")
public class InMemoryCondstore extends Condstore {
private JamesImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
index 6ccec80..8cdee93 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaCondstore.java
@@ -4,12 +4,10 @@ import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.suite.Condstore;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why ?")
public class JpaCondstore extends Condstore {
private JamesImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
index b4c5399..3c2d0f4 100644
--- a/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
+++ b/mpt/impl/imap-mailbox/jpa/src/test/java/org/apache/james/mpt/imapmailbox/jpa/JpaMailboxTestModule.java
@@ -20,6 +20,7 @@ package org.apache.james.mpt.imapmailbox.jpa;
import org.apache.james.mpt.api.HostSystem;
import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.jpa.host.JPAHostSystem;
import com.google.inject.AbstractModule;
@@ -31,11 +32,12 @@ public class JpaMailboxTestModule extends AbstractModule {
@Override
protected void configure() {
bind(HostSystem.class).to(ImapHostSystem.class);
+ bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
}
@Provides
@Singleton
- public ImapHostSystem provideImapHostSystem() throws Exception {
+ public JamesImapHostSystem provideImapHostSystem() throws Exception {
return JPAHostSystem.build();
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
index ad90cf4..42b12db 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneCondstore.java
@@ -4,12 +4,10 @@ import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.suite.Condstore;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why ?")
public class LuceneCondstore extends Condstore {
private JamesImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTestModule.java b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTestModule.java
index 474cc5d..4f54114 100644
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTestModule.java
+++ b/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTestModule.java
@@ -21,6 +21,7 @@ package org.apache.james.mpt.imapmailbox.lucenesearch;
import org.apache.james.mpt.api.HostSystem;
import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
import com.google.inject.AbstractModule;
@@ -30,12 +31,13 @@ import com.google.inject.Singleton;
public class LuceneSearchMailboxTestModule extends AbstractModule {
@Override
protected void configure() {
- bind(HostSystem.class).to(ImapHostSystem.class);
+ bind(HostSystem.class).to(JamesImapHostSystem.class);
+ bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
}
@Provides
@Singleton
- public ImapHostSystem provideImapHostSystem() throws Exception {
+ public JamesImapHostSystem provideImapHostSystem() throws Exception {
return new LuceneSearchHostSystem();
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
index ff7b6e0..43972d1 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirCondstore.java
@@ -4,12 +4,10 @@ import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.suite.Condstore;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import com.google.inject.Guice;
import com.google.inject.Injector;
-@Ignore("why ?")
public class MaildirCondstore extends Condstore {
private JamesImapHostSystem system;
http://git-wip-us.apache.org/repos/asf/james-project/blob/6a23a1b2/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java
index 9c1f04c..33b7768 100644
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java
+++ b/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.java
@@ -20,6 +20,7 @@ package org.apache.james.mpt.imapmailbox.maildir;
import org.apache.james.mpt.api.HostSystem;
import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.host.JamesImapHostSystem;
import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
import com.google.inject.AbstractModule;
@@ -30,12 +31,13 @@ public class MaildirMailboxTestModule extends AbstractModule {
@Override
protected void configure() {
- bind(HostSystem.class).to(ImapHostSystem.class);
+ bind(HostSystem.class).to(JamesImapHostSystem.class);
+ bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
}
@Provides
@Singleton
- public ImapHostSystem provideImapHostSystem() throws Exception {
+ public JamesImapHostSystem provideImapHostSystem() throws Exception {
return MaildirHostSystem.build();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org
[11/21] james-project git commit: MPT-39 remove crazy abstract test
class hierarchy
Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
index 99481ed..5e1d5e1 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearch.java
@@ -24,46 +24,74 @@ import java.util.Locale;
import javax.inject.Inject;
import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-public class UidSearch extends BaseAuthenticatedState {
+public class UidSearch implements ImapTestConstants {
@Inject
private static HostSystem system;
- public UidSearch() throws Exception {
- super(system);
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testSearchAtomsUS() throws Exception {
- scriptTest("UidSearchAtoms", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("UidSearchAtoms");
}
@Test
public void testSearchAtomsITALY() throws Exception {
- scriptTest("UidSearchAtoms", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("UidSearchAtoms");
}
@Test
public void testSearchAtomsKOREA() throws Exception {
- scriptTest("UidSearchAtoms", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("UidSearchAtoms");
}
@Test
public void testSearchCombinationsUS() throws Exception {
- scriptTest("UidSearchCombinations", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("UidSearchCombinations");
}
@Test
public void testSearchCombinationsITALY() throws Exception {
- scriptTest("UidSearchCombinations", Locale.ITALY);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.ITALY)
+ .run("UidSearchCombinations");
}
@Test
public void testSearchCombinationsKOREA() throws Exception {
- scriptTest("UidSearchCombinations", Locale.KOREA);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.KOREA)
+ .run("UidSearchCombinations");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
index 25c1026..1029027 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UidSearchOnIndex.java
@@ -19,25 +19,38 @@
package org.apache.james.mpt.imapmailbox.suite;
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
-import org.junit.Test;
+import java.util.Locale;
import javax.inject.Inject;
-import java.util.Locale;
-public class UidSearchOnIndex extends BaseAuthenticatedState {
+import org.apache.james.mpt.api.HostSystem;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.Before;
+import org.junit.Test;
+
+public class UidSearchOnIndex implements ImapTestConstants {
@Inject
private static HostSystem system;
- public UidSearchOnIndex() throws Exception {
- super(system);
- }
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
@Test
public void testSearchAtomsUS() throws Exception {
- scriptTest("UidSearchAtomsIndexer", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("UidSearchAtomsIndexer");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
index 917f9af..b0c832e 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/UserFlagsSupport.java
@@ -19,28 +19,47 @@
package org.apache.james.mpt.imapmailbox.suite;
-import com.google.inject.Inject;
import java.util.Locale;
import org.apache.james.mpt.api.ImapFeatures;
import org.apache.james.mpt.api.ImapHostSystem;
-import org.apache.james.mpt.imapmailbox.suite.base.BaseAuthenticatedState;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.imapmailbox.suite.base.BasicImapCommands;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Assume;
+import org.junit.Before;
import org.junit.Test;
-public class UserFlagsSupport extends BaseAuthenticatedState {
+import com.google.inject.Inject;
+
+public class UserFlagsSupport implements ImapTestConstants {
@Inject
private static ImapHostSystem system;
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
- public UserFlagsSupport() throws Exception {
- super(system);
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/imap/scripts/", system)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ BasicImapCommands.welcome(simpleScriptedTestProtocol);
+ BasicImapCommands.authenticate(simpleScriptedTestProtocol);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ system.afterTest();
}
@Test
public void testUserFlagsSupport() throws Exception {
Assume.assumeTrue(system.supports(ImapFeatures.Feature.USER_FLAGS_SUPPORT));
- scriptTest("UserFlagsSupport", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("UserFlagsSupport");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseAuthenticatedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseAuthenticatedState.java
deleted file mode 100644
index 624306d..0000000
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseAuthenticatedState.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************
- * 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.base;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.ImapTestConstants;
-import org.junit.Before;
-
-/**
- * <p>
- * Runs tests for commands valid in the AUTHENTICATED state. A login session
- * precedes the execution of the test elements.
- * </p>
- * <p>
- * Suggested tests:
- * </p>
- * <ul>
- * <li>ValidSelected</li>
- * <li>ValidNonAuthenticated</li>
- * <li>Capability</li>
- * <li>Noop</li>
- * <li>Logout</li>
- * <li>AppendExamineInbox</li>
- * <li>AppendSelectInbox</li>
- * <li>Create</li>
- * <li>ExamineEmpty</li>
- * <li>SelectEmpty</li>
- * <li>ListNamespace</li>
- * <li>ListMailboxes</li>
- * <li>Status</li>
- * <li>Subscribe</li>
- * <li>Delete</li>
- * <li>Append</li>
- * <li>Compound:
- * <ul>
- * <li>AppendExpunge</li>
- * <li>SelectAppend</li>
- * <li>StringArgs</li>
- * </ul>
- * </li>
- * </ul>
- * </p>
- */
-public class BaseAuthenticatedState extends
- BaseImapProtocol implements ImapTestConstants {
- public BaseAuthenticatedState(HostSystem hostSystem) throws Exception {
- super(hostSystem);
- }
-
- /**
- * Sets up {@link #preElements} with a welcome message and login
- * request/response.
- *
- * @throws Exception
- */
- @Before
- public void setUp() throws Exception {
- super.setUp();
- addTestFile("Welcome.test", preElements);
- addLogin(USER, PASSWORD);
- }
-
- protected void addLogin(String username, String password) {
- preElements.CL("a001 LOGIN " + username + " " + password);
- preElements.SL("a001 OK .*",
- "BaseAuthenticatedState.java:83");
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseImapProtocol.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseImapProtocol.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseImapProtocol.java
deleted file mode 100644
index edb277c..0000000
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseImapProtocol.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/****************************************************************
- * 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.base;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.imapmailbox.ImapTestConstants;
-import org.apache.james.mpt.script.AbstractSimpleScriptedTestProtocol;
-import org.junit.Before;
-
-/**
- * Specialise the protocol test framework for IMAP.
- */
-public class BaseImapProtocol extends AbstractSimpleScriptedTestProtocol implements ImapTestConstants {
-
- public BaseImapProtocol(HostSystem hostSystem) throws Exception {
- super(hostSystem, USER, PASSWORD, "/org/apache/james/imap/scripts/");
- }
-
- @Before
- public void setUp() throws Exception {
- super.setUp();
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseNonAuthenticatedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseNonAuthenticatedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseNonAuthenticatedState.java
deleted file mode 100644
index 46dda12..0000000
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseNonAuthenticatedState.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************
- * 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.base;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.junit.Before;
-
-/**
- * <p>
- * Runs tests for commands valid in the NON_AUTHENTICATED state. A welcome
- * message precedes the execution of the test elements.
- * </p>
- * <p>
- * Recommended test scripts:
- * </p>
- * <ul>
- * <li>ValidAuthenticated</li>
- * <li>ValidSelected</li>
- * <li>Capability</li>
- * <li>Noop</li>
- * <li>Logout</li>
- * <li>Authenticate</li>
- * <li>Login</li>
- * </ul>
- */
-public class BaseNonAuthenticatedState extends BaseImapProtocol {
- public BaseNonAuthenticatedState(HostSystem system) throws Exception {
- super(system);
- }
-
- /**
- * Adds a welcome message to the {@link #preElements}.
- *
- * @throws Exception
- */
- @Before
- public void setUp() throws Exception {
- super.setUp();
-
- addTestFile("Welcome.test", preElements);
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedInbox.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedInbox.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedInbox.java
deleted file mode 100644
index c48c382..0000000
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedInbox.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************
- * 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.base;
-
-import org.apache.james.mpt.api.HostSystem;
-
-/**
- * <p>
- * Tests commands which are valid in AUTHENTICATED and NONAUTHENTICATED by
- * running them in the SELECTED state. Many commands function identically, while
- * others are invalid in this state.
- * </p>
- * <p>
- * Recommended scripts:
- * </p>
- * <ul>
- * <li>ValidNonAuthenticated</li>
- * <li>Capability</li>
- * <li>Noop</li>
- * <li>Logout</li>
- * <li>Create</li>
- * <li>ExamineEmpty</li>
- * <li>SelectEmpty</li>
- * <li>ListNamespace</li>
- * <li>ListMailboxes</li>
- * <li>Status</li>
- * <li>StringArgs</li>
- * <li>Subscribe</li>
- * <li>Append</li>
- * <li>Delete</li>
- * </ul>
- *
- * @author Darrell DeBoer <da...@apache.org>
- *
- * @version $Revision: 560719 $
- */
-public class BaseSelectedInbox extends BaseAuthenticatedState {
- public BaseSelectedInbox(HostSystem system) throws Exception {
- super(system);
- }
-
- /**
- * Superclass sets up welcome message and login session in
- * {@link #preElements}. A "SELECT INBOX" session is then added to these
- * elements.
- *
- * @throws Exception
- */
- public void setUp() throws Exception {
- super.setUp();
- addTestFile("SelectInbox.test", preElements);
- }
-
- protected void addCloseInbox() {
- postElements.CL("a CLOSE");
- postElements.SL(".*", "AbstractBaseTestSelectedInbox.java:76");
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedState.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedState.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedState.java
deleted file mode 100644
index 66a07b7..0000000
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BaseSelectedState.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************
- * 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.base;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.junit.Before;
-
-/**
- * <p>
- * Runs tests for commands valid only in the SELECTED state. A login session and
- * setup of a "seleted" mailbox precedes the execution of the test elements.
- * </p>
- * <p>
- * Recommended scripts:
- * </p>
- * <ul>
- * <li>Check"</li>
- * <li>Expunge"</li>
- * <li>Search"</li>
- * <li>FetchSingleMessage"</li>
- * <li>FetchMultipleMessages"</li>
- * <li>FetchPeek"</li>
- * <li>Store"</li>
- * <li>Copy"</li>
- * <li>Uid"</li>
- * </ul>
- */
-public class BaseSelectedState extends BaseAuthenticatedState {
-
- public BaseSelectedState(HostSystem system) throws Exception {
- super(system);
- }
-
- /**
- * Superclass sets up welcome message and login session in
- * {@link #preElements}. A "SELECT INBOX" session is then added to these
- * elements.
- *
- * @throws Exception
- */
- @Before
- public void setUp() throws Exception {
- super.setUp();
- addTestFile("SelectedStateSetup.test", preElements);
- addTestFile("SelectedStateCleanup.test", postElements);
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
----------------------------------------------------------------------
diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
new file mode 100644
index 0000000..9d508b0
--- /dev/null
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/base/BasicImapCommands.java
@@ -0,0 +1,68 @@
+/****************************************************************
+ * 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.base;
+
+import org.apache.james.mpt.api.ProtocolInteractor;
+import org.apache.james.mpt.imapmailbox.ImapTestConstants;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+
+
+public class BasicImapCommands implements ImapTestConstants {
+
+ public static void welcome(SimpleScriptedTestProtocol scriptedTestProtocol) {
+ scriptedTestProtocol.preElements().SL("\\* OK IMAP4rev1 Server ready", "BaseAuthenticatedState.java:32");
+ }
+
+ public static void authenticate(SimpleScriptedTestProtocol scriptedTestProtocol) {
+ addLogin(scriptedTestProtocol.preElements(), USER, PASSWORD);
+ }
+
+
+ private static void addLogin(ProtocolInteractor preElements, String username, String password) {
+ preElements.CL("a001 LOGIN " + username + " " + password);
+ preElements.SL("a001 OK .*", "BaseAuthenticatedState.java:53");
+ }
+
+ public static void selectInbox(SimpleScriptedTestProtocol scriptedTestProtocol) {
+ ProtocolInteractor preElements = scriptedTestProtocol.preElements();
+
+ preElements.CL("abcd SELECT inbox");
+ preElements.SL("\\* FLAGS \\(\\\\Answered \\\\Deleted \\\\Draft \\\\Flagged \\\\Seen\\)", "BasicImapCommands");
+ preElements.SL("\\* \\d+ EXISTS", "BasicImapCommands");
+ preElements.SL("\\* \\d+ RECENT", "BasicImapCommands");
+ preElements.SL("\\* OK \\[UIDVALIDITY \\d+\\].*", "BasicImapCommands");
+ preElements.SL("\\* OK \\[PERMANENTFLAGS \\(\\\\Answered \\\\Deleted \\\\Draft \\\\Flagged \\\\\\Seen( \\\\\\*)?\\)\\].*", "BasicImapCommands");
+ preElements.SL("\\* OK \\[HIGHESTMODSEQ \\d+\\].*", "BasicImapCommands");
+ preElements.SL("\\* OK \\[UIDNEXT 1\\].*", "BasicImapCommands");
+ preElements.SL("abcd OK \\[READ-WRITE\\] SELECT completed.", "BasicImapCommands");
+
+ addCloseInbox(scriptedTestProtocol.postElements());
+ }
+
+ private static void addCloseInbox(ProtocolInteractor postElements) {
+ postElements.CL("a CLOSE");
+ postElements.SL(".*", "AbstractBaseTestSelectedInbox.java:76");
+ }
+
+ public static void prepareMailbox(SimpleScriptedTestProtocol scriptedTestProtocol) throws Exception {
+ scriptedTestProtocol.addTestFile("SelectedStateSetup.test", scriptedTestProtocol.preElements());
+ scriptedTestProtocol.addTestFile("SelectedStateCleanup.test", scriptedTestProtocol.postElements());
+ }
+}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
index 11aaa46..d802f72 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/AuthenticateTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class AuthenticateTest extends ManageSieveMPTTest {
+public class AuthenticateTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public AuthenticateTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void authenticateShouldWork() throws Exception {
- scriptTest("authenticate", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("authenticate");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
index 3da29d8..f8a2fbd 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CapabilityTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class CapabilityTest extends ManageSieveMPTTest {
+public class CapabilityTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public CapabilityTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void capabilityShouldWork() throws Exception {
- scriptTest("capability", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("capability");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
index dc8877c..9363f67 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/CheckScriptTest.java
@@ -21,27 +21,39 @@ package org.apache.james.mpt.testsuite;
import com.google.inject.Inject;
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.Locale;
-public class CheckScriptTest extends ManageSieveMPTTest {
+public class CheckScriptTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public CheckScriptTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void checkScriptShouldWork() throws Exception {
- scriptTest("checkscript", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("checkscript");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
index dcc3b2c..cdc7b53 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/DeleteScriptTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class DeleteScriptTest extends ManageSieveMPTTest {
+public class DeleteScriptTest {
@Inject
private static ManageSieveHostSystem hostSystem;
-
- public DeleteScriptTest() throws Exception {
- super(hostSystem);
- }
+
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void deleteScriptShouldWork() throws Exception {
- scriptTest("deletescript", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("deletescript");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
index aa67817..d302af4 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/GetScriptTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class GetScriptTest extends ManageSieveMPTTest {
+public class GetScriptTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public GetScriptTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void getScriptShouldWork() throws Exception {
- scriptTest("getscript", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("getscript");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java
index b14bd13..213b012 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/HaveSpaceTest.java
@@ -19,31 +19,44 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class HaveSpaceTest extends ManageSieveMPTTest {
+public class HaveSpaceTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public HaveSpaceTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
hostSystem.setMaxQuota(USER, 50);
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void haveSpaceShouldWork() throws Exception {
- scriptTest("havespace", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("havespace");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java
index d568034..d27b3c9 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ListScriptsTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class ListScriptsTest extends ManageSieveMPTTest {
+public class ListScriptsTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public ListScriptsTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void listScriptsShouldWork() throws Exception {
- scriptTest("listscripts", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("listscripts");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java
index e51a50e..64b5079 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/LogoutTest.java
@@ -19,23 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class LogoutTest extends ManageSieveMPTTest {
+public class LogoutTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public LogoutTest() throws Exception {
- super(hostSystem);
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void logoutShouldWork() throws Exception {
- scriptTest("logout", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("logout");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ManageSieveMPTTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ManageSieveMPTTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ManageSieveMPTTest.java
deleted file mode 100644
index fc21957..0000000
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/ManageSieveMPTTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************
- * 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.testsuite;
-
-import org.apache.james.mpt.api.HostSystem;
-import org.apache.james.mpt.script.AbstractSimpleScriptedTestProtocol;
-
-public class ManageSieveMPTTest extends AbstractSimpleScriptedTestProtocol {
-
- public static final String USER = "user";
- public static final String PASSWORD = "password";
-
- public ManageSieveMPTTest(HostSystem hostSystem) throws Exception {
- super(hostSystem, USER, PASSWORD, "/org/apache/james/managesieve/scripts/");
- }
-}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java
index 53d8559..e881477 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/NoopTest.java
@@ -19,24 +19,43 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class NoopTest extends ManageSieveMPTTest {
+public class NoopTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public NoopTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
+ @Before
+ public void setUp() throws Exception {
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
+ }
+
@Test
public void noopShouldWork() throws Exception {
- scriptTest("noop", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("noop");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java
index be9010f..5337fcd 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/PutScriptTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class PutScriptTest extends ManageSieveMPTTest {
+public class PutScriptTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public PutScriptTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void putScriptShouldWork() throws Exception {
- scriptTest("putscript", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("putscript");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java
index 44b44dc..e1c6cb4 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/RenameScriptTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class RenameScriptTest extends ManageSieveMPTTest {
+public class RenameScriptTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public RenameScriptTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void renameScriptShouldWork() throws Exception {
- scriptTest("renamescript", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("renamescript");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java
index 1edad93..9a3f044 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/SetActiveTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class SetActiveTest extends ManageSieveMPTTest {
+public class SetActiveTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public SetActiveTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void setActiveShouldWork() throws Exception {
- scriptTest("setactive", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("setactive");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java
index 140ac7a..ac61a1d 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/StartTlsTest.java
@@ -19,29 +19,42 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class StartTlsTest extends ManageSieveMPTTest {
+public class StartTlsTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public StartTlsTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
}
@Test
public void startTlsShouldWork() throws Exception {
- scriptTest("starttls", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("starttls");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java
index b909d23..aa1f64f 100644
--- a/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java
+++ b/mpt/impl/managesieve/core/src/main/java/org/apache/james/mpt/testsuite/UnauthenticatedTest.java
@@ -19,30 +19,43 @@
package org.apache.james.mpt.testsuite;
-import com.google.inject.Inject;
+import java.util.Locale;
+
import org.apache.james.mpt.host.ManageSieveHostSystem;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import java.util.Locale;
+import com.google.inject.Inject;
-public class UnauthenticatedTest extends ManageSieveMPTTest {
+public class UnauthenticatedTest {
@Inject
private static ManageSieveHostSystem hostSystem;
- public UnauthenticatedTest() throws Exception {
- super(hostSystem);
- }
+ public static final String USER = "user";
+ public static final String PASSWORD = "password";
+
+ private SimpleScriptedTestProtocol simpleScriptedTestProtocol;
@Before
public void setUp() throws Exception {
- super.setUp();
+ simpleScriptedTestProtocol = new SimpleScriptedTestProtocol("/org/apache/james/managesieve/scripts/", hostSystem)
+ .withUser(USER, PASSWORD)
+ .withLocale(Locale.US);
}
+ @After
+ public void tearDown() throws Exception {
+ hostSystem.afterTest();
+ }
+
@Test
public void unauthenticatedCommandShouldWork() throws Exception {
- scriptTest("unauthenticate", Locale.US);
+ simpleScriptedTestProtocol
+ .withLocale(Locale.US)
+ .run("unauthenticate");
}
}
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
index cb8ca5f..c6e8814 100644
--- a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
+++ b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/ForwardSmtpTest.java
@@ -28,7 +28,7 @@ import java.util.Locale;
import javax.inject.Inject;
-import org.apache.james.mpt.script.AbstractSimpleScriptedTestProtocol;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.apache.james.util.streams.SwarmGenericContainer;
import org.junit.Before;
import org.junit.Rule;
@@ -42,7 +42,7 @@ import com.jayway.restassured.RestAssured;
import com.jayway.restassured.builder.RequestSpecBuilder;
import com.jayway.restassured.http.ContentType;
-public class ForwardSmtpTest extends AbstractSimpleScriptedTestProtocol {
+public class ForwardSmtpTest {
public static final String USER = "bob";
public static final String DOMAIN = "mydomain.tld";
@@ -59,13 +59,16 @@ public class ForwardSmtpTest extends AbstractSimpleScriptedTestProtocol {
@Inject
private static SmtpHostSystem hostSystem;
+ private SimpleScriptedTestProtocol scriptedTest;
+
public ForwardSmtpTest() throws Exception {
- super(hostSystem, USER_AT_DOMAIN, PASSWORD, "/org/apache/james/smtp/scripts/");
+ scriptedTest = new SimpleScriptedTestProtocol("/org/apache/james/smtp/scripts/", hostSystem)
+ .withLocale(Locale.US)
+ .withUser(USER_AT_DOMAIN, PASSWORD);
}
@Before
public void setUp() throws Exception {
- super.setUp();
InetAddress containerIp = InetAddresses.forString(fakeSmtp.getIp());
hostSystem.getInMemoryDnsService()
.registerRecord("yopmail.com", containerIp, "yopmail.com");
@@ -82,7 +85,7 @@ public class ForwardSmtpTest extends AbstractSimpleScriptedTestProtocol {
@Test
public void forwardingAnEmailShouldWork() throws Exception {
- scriptTest("helo", Locale.US);
+ scriptedTest.run("helo");
when()
.get("/api/email")
http://git-wip-us.apache.org/repos/asf/james-project/blob/986df60d/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java
----------------------------------------------------------------------
diff --git a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java
index 764cdc9..e667886 100644
--- a/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java
+++ b/mpt/impl/smtp/core/src/main/java/org/apache/james/mpt/smtp/SmtpStarttlsCommandTest.java
@@ -22,14 +22,13 @@ import java.util.Locale;
import javax.inject.Inject;
-import org.apache.james.mpt.script.AbstractSimpleScriptedTestProtocol;
-import org.junit.Before;
+import org.apache.james.mpt.script.SimpleScriptedTestProtocol;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.RuleChain;
import org.junit.rules.TemporaryFolder;
-public class SmtpStarttlsCommandTest extends AbstractSimpleScriptedTestProtocol {
+public class SmtpStarttlsCommandTest {
public static final String USER = "bob";
public static final String DOMAIN = "mydomain.tld";
@@ -43,41 +42,40 @@ public class SmtpStarttlsCommandTest extends AbstractSimpleScriptedTestProtocol
@Inject
private static SmtpHostSystem hostSystem;
+
+ private SimpleScriptedTestProtocol scriptedTest;
public SmtpStarttlsCommandTest() throws Exception {
- super(hostSystem, USER_AT_DOMAIN, PASSWORD, "/org/apache/james/smtp/scripts/");
- }
-
- @Before
- public void setUp() throws Exception {
- super.setUp();
+ String scriptDir = "/org/apache/james/smtp/scripts/";
+ scriptedTest = new SimpleScriptedTestProtocol(scriptDir, hostSystem)
+ .withLocale(Locale.US)
+ .withUser(USER_AT_DOMAIN, PASSWORD);
}
@Test
public void starttlsShouldWork() throws Exception {
- scriptTest("starttls", Locale.US);
+ scriptedTest.run("starttls");
}
@Test
public void starttlsShouldBeRejectedWhenFollowedByCommand() throws Exception {
- scriptTest("starttls_with_injection", Locale.US);
+ scriptedTest.run("starttls_with_injection");
}
@Test
public void shouldNotRejectContentWithStartTls() throws Exception {
- scriptTest("data_with_starttls", Locale.US);
+ scriptedTest.run("data_with_starttls");
}
@Test
public void shouldNotRejectRcptWithStartTls() throws Exception {
- hostSystem.addUser("starttls@mydomain.tld", PASSWORD);
-
- scriptTest("rcpt_with_starttls", Locale.US);
+ scriptedTest.withUser("starttls@mydomain.tld", PASSWORD);
+ scriptedTest.run("rcpt_with_starttls");
}
@Test
public void shouldNotRejectContentStartsWithStartTls() throws Exception {
- scriptTest("data_starts_with_starttls", Locale.US);
+ scriptedTest.run("data_starts_with_starttls");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org