james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [08/15] james-project git commit: PROTOCOLS-117 General fixes: Most MPT tests do not need Guice
Date Fri, 03 Nov 2017 12:27:31 GMT
http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
deleted file mode 100644
index 4f54114..0000000
--- a/mpt/impl/imap-mailbox/lucenesearch/src/test/java/org/apache/james/mpt/imapmailbox/lucenesearch/LuceneSearchMailboxTestModule.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.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;
-import com.google.inject.Provides;
-import com.google.inject.Singleton;
-
-public class LuceneSearchMailboxTestModule extends AbstractModule {
-    @Override
-    protected void configure() {
-        bind(HostSystem.class).to(JamesImapHostSystem.class);
-        bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
-    }
-
-    @Provides
-    @Singleton
-    public JamesImapHostSystem provideImapHostSystem() throws Exception {
-        return new LuceneSearchHostSystem();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 392c4d5..a12c78d 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 1f2028c..695474c 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 561835e..79d6746 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 a2a4724..7e73c91 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 9c5087b..e18ab9c 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 61e89f1..d2d1d3c 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 93b9492..ad9470c 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.lucenesearch;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.lucenesearch.host.LuceneSearchHostSystem;
 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 = new LuceneSearchHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 1c4880b..836be6e 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 a004f20..8ddc18a 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 46da204..b4d7c16 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 29b6e82..46e06c9 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.host.JamesImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 import org.apache.james.mpt.imapmailbox.suite.Condstore;
 import org.junit.After;
 import org.junit.Before;
 
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 3393d82..f6e140c 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 1d74bed..d8784dd 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 cdfe2ae..86b22a9 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 e7a787a..5fb37f0 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 a73524a..8c505c0 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 46b2027..2d07b73 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 d5e7419..0209729 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 fce3fbc..00bbd1d 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 b14e62b..0398fd7 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         super.setUp();
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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
deleted file mode 100644
index 33b7768..0000000
--- a/mpt/impl/imap-mailbox/maildir/src/test/java/org/apache/james/mpt/imapmailbox/maildir/MaildirMailboxTestModule.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.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;
-import com.google.inject.Provides;
-import com.google.inject.Singleton;
-
-public class MaildirMailboxTestModule extends AbstractModule {
-
-    @Override
-    protected void configure() {
-        bind(HostSystem.class).to(JamesImapHostSystem.class);
-        bind(ImapHostSystem.class).to(JamesImapHostSystem.class);
-    }
-
-    @Provides
-    @Singleton
-    public JamesImapHostSystem provideImapHostSystem() throws Exception {
-        return MaildirHostSystem.build();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 f20e6a9..9355b75 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
@@ -20,14 +20,12 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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("MAILBOX-299 Maildir should fail gracefully when too long mailbox name")
 public class MaildirMailboxWithLongNameError extends MailboxWithLongNameError {
 
@@ -35,8 +33,7 @@ public class MaildirMailboxWithLongNameError extends MailboxWithLongNameError {
 
     @Before
     public void setUp() throws Exception {
-        Injector injector = Guice.createInjector(new MaildirMailboxTestModule());
-        system = injector.getInstance(ImapHostSystem.class);
+        system = new MaildirHostSystem();
         super.setUp();
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 a068b90..823aed4 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         super.setUp();
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 1956d13..cb67c08 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 a784a8c..58082c6 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 baa1cc9..c69718b 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         super.setUp();
     }
     

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 018b369..e631cf5 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 51e17c3..ea0e61d 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 7bf4fe9..7a06c07 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 cdda4a9..9c0bc7b 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 9f66709..46c655b 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 b6652bc..4021469 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 6e0435a..3dd23de 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 bd97389..fd26238 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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);
+        system = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/deefc33a/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 f4afb13..01b567a 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
@@ -20,21 +20,18 @@
 package org.apache.james.mpt.imapmailbox.maildir;
 
 import org.apache.james.mpt.api.ImapHostSystem;
+import org.apache.james.mpt.imapmailbox.maildir.host.MaildirHostSystem;
 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 = new MaildirHostSystem();
         system.beforeTest();
         super.setUp();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message