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:24 UTC
[10/21] james-project git commit: MPT-39 finally remove this crazy
static injection with onami
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