james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [01/13] james-project git commit: JAMES-1717 Integration testing should rely on Type litterals introduced by *JamesServer
Date Fri, 22 Apr 2016 08:33:09 GMT
Repository: james-project
Updated Branches:
  refs/heads/master 3dd21e359 -> 1f3d5c8f2


JAMES-1717 Integration testing should rely on Type litterals introduced by *JamesServer


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/04978a98
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/04978a98
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/04978a98

Branch: refs/heads/master
Commit: 04978a98312c91022dc1f6f609ea82720b73580c
Parents: 76f852e
Author: Benoit Tellier <btellier@linagora.com>
Authored: Tue Apr 19 11:07:05 2016 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Fri Apr 22 15:26:24 2016 +0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/james/MemoryJamesServerMain.java   | 2 +-
 .../james/jmap/cassandra/CassandraGetMailboxesMethodTest.java   | 3 +--
 .../james/jmap/cassandra/CassandraGetMessageListMethodTest.java | 5 +----
 .../james/jmap/cassandra/CassandraGetMessagesMethodTest.java    | 5 +----
 .../james/jmap/cassandra/CassandraJmapAuthenticationTest.java   | 5 +----
 .../james/jmap/cassandra/CassandraSetMessagesMethodTest.java    | 5 +----
 .../apache/james/jmap/memory/MemoryGetMailboxesMethodTest.java  | 5 +----
 .../james/jmap/memory/MemoryGetMessageListMethodTest.java       | 5 +----
 .../apache/james/jmap/memory/MemoryGetMessagesMethodTest.java   | 5 +----
 .../apache/james/jmap/memory/MemoryJmapAuthenticationTest.java  | 5 +----
 .../apache/james/jmap/memory/MemorySetMailboxesMethodTest.java  | 5 +----
 .../apache/james/jmap/memory/MemorySetMessagesMethodTest.java   | 5 +----
 12 files changed, 12 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
b/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
index b3dffbc..511180a 100644
--- a/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
+++ b/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
@@ -32,7 +32,7 @@ import com.google.inject.util.Modules;
 
 public class MemoryJamesServerMain {
 
-    private static final TypeLiteral<InMemoryId> inMemoryId = new TypeLiteral<InMemoryId>(){};
+    public static final TypeLiteral<InMemoryId> inMemoryId = new TypeLiteral<InMemoryId>(){};
     
     public static final Module inMemoryServerModule = Modules.combine(
         new MemoryDataModule(),

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
index 84ddbec..de712bc 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java
@@ -30,7 +30,6 @@ import org.junit.Rule;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
 
 public class CassandraGetMailboxesMethodTest extends GetMailboxesMethodTest {
 
@@ -45,7 +44,7 @@ public class CassandraGetMailboxesMethodTest extends GetMailboxesMethodTest
{
 
     @Override
     protected GuiceJamesServer<CassandraId> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){})
+        return new GuiceJamesServer<>(CassandraJamesServerMain.cassandraId)
                     .combineWith(CassandraJamesServerMain.cassandraServerModule)
                     .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch,
cassandra));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
index ca5dffc..54ed007 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java
@@ -24,14 +24,11 @@ import org.apache.james.GuiceJamesServer;
 import org.apache.james.backends.cassandra.EmbeddedCassandra;
 import org.apache.james.jmap.methods.integration.GetMessageListMethodTest;
 import org.apache.james.modules.CassandraJmapServerModule;
-import org.apache.james.mailbox.cassandra.CassandraId;
 import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
 import org.junit.Rule;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class CassandraGetMessageListMethodTest extends GetMessageListMethodTest {
 
     private TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -45,7 +42,7 @@ public class CassandraGetMessageListMethodTest extends GetMessageListMethodTest
     
     @Override
     protected GuiceJamesServer<?> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){})
+        return new GuiceJamesServer<>(CassandraJamesServerMain.cassandraId)
                 .combineWith(CassandraJamesServerMain.cassandraServerModule)
                 .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch,
cassandra));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java
index b5f7e0f..04eb484 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java
@@ -24,14 +24,11 @@ import org.apache.james.GuiceJamesServer;
 import org.apache.james.backends.cassandra.EmbeddedCassandra;
 import org.apache.james.jmap.methods.integration.GetMessagesMethodTest;
 import org.apache.james.modules.CassandraJmapServerModule;
-import org.apache.james.mailbox.cassandra.CassandraId;
 import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
 import org.junit.Rule;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class CassandraGetMessagesMethodTest extends GetMessagesMethodTest {
 
     private TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -45,7 +42,7 @@ public class CassandraGetMessagesMethodTest extends GetMessagesMethodTest
{
 
     @Override
     protected GuiceJamesServer<?> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){})
+        return new GuiceJamesServer<>(CassandraJamesServerMain.cassandraId)
                     .combineWith(CassandraJamesServerMain.cassandraServerModule)
                     .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch,
cassandra));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
index 3f7eeb8..ae2cb1e 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java
@@ -25,14 +25,11 @@ import org.apache.james.jmap.FixedDateZonedDateTimeProvider;
 import org.apache.james.jmap.JMAPAuthenticationTest;
 import org.apache.james.modules.CassandraJmapServerModule;
 import org.apache.james.jmap.utils.ZonedDateTimeProvider;
-import org.apache.james.mailbox.cassandra.CassandraId;
 import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
 import org.junit.Rule;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class CassandraJmapAuthenticationTest extends JMAPAuthenticationTest {
 
     private TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -46,7 +43,7 @@ public class CassandraJmapAuthenticationTest extends JMAPAuthenticationTest
{
 
     @Override
     protected GuiceJamesServer<?> createJmapServer(FixedDateZonedDateTimeProvider zonedDateTimeProvider)
{
-        return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){})
+        return new GuiceJamesServer<>(CassandraJamesServerMain.cassandraId)
                     .combineWith(CassandraJamesServerMain.cassandraServerModule)
                     .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch,
cassandra),
                             (binder) -> binder.bind(ZonedDateTimeProvider.class).toInstance(zonedDateTimeProvider));

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
index 90c52b7..3c9a1d8 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java
@@ -24,14 +24,11 @@ import org.apache.james.GuiceJamesServer;
 import org.apache.james.backends.cassandra.EmbeddedCassandra;
 import org.apache.james.jmap.methods.integration.SetMessagesMethodTest;
 import org.apache.james.modules.CassandraJmapServerModule;
-import org.apache.james.mailbox.cassandra.CassandraId;
 import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch;
 import org.junit.Rule;
 import org.junit.rules.RuleChain;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class CassandraSetMessagesMethodTest extends SetMessagesMethodTest {
 
     private TemporaryFolder temporaryFolder = new TemporaryFolder();
@@ -45,7 +42,7 @@ public class CassandraSetMessagesMethodTest extends SetMessagesMethodTest
{
 
     @Override
     protected GuiceJamesServer<?> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){})
+        return new GuiceJamesServer<>(CassandraJamesServerMain.cassandraId)
                     .combineWith(CassandraJamesServerMain.cassandraServerModule)
                     .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch,
cassandra));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMailboxesMethodTest.java
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMailboxesMethodTest.java
index 3680fb0..6c01766 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMailboxesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMailboxesMethodTest.java
@@ -23,12 +23,9 @@ import org.apache.james.GuiceJamesServer;
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.jmap.methods.integration.GetMailboxesMethodTest;
 import org.apache.james.jmap.servers.MemoryJmapServerModule;
-import org.apache.james.mailbox.inmemory.InMemoryId;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class MemoryGetMailboxesMethodTest extends GetMailboxesMethodTest {
 
     @Rule
@@ -36,7 +33,7 @@ public class MemoryGetMailboxesMethodTest extends GetMailboxesMethodTest
{
 
     @Override
     protected GuiceJamesServer<?> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<InMemoryId>(){})
+        return new GuiceJamesServer<>(MemoryJamesServerMain.inMemoryId)
                 .combineWith(MemoryJamesServerMain.inMemoryServerModule)
                 .overrideWith(new MemoryJmapServerModule(temporaryFolder));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java
index aa95f37..2a9e07a 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessageListMethodTest.java
@@ -23,12 +23,9 @@ import org.apache.james.GuiceJamesServer;
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.jmap.methods.integration.GetMessageListMethodTest;
 import org.apache.james.jmap.servers.MemoryJmapServerModule;
-import org.apache.james.mailbox.inmemory.InMemoryId;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class MemoryGetMessageListMethodTest extends GetMessageListMethodTest {
 
     @Rule
@@ -36,7 +33,7 @@ public class MemoryGetMessageListMethodTest extends GetMessageListMethodTest
{
 
     @Override
     protected GuiceJamesServer<?> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<InMemoryId>(){})
+        return new GuiceJamesServer<>(MemoryJamesServerMain.inMemoryId)
                     .combineWith(MemoryJamesServerMain.inMemoryServerModule)
                     .overrideWith(new MemoryJmapServerModule(temporaryFolder));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessagesMethodTest.java
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessagesMethodTest.java
index cfbf467..5970c82 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessagesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryGetMessagesMethodTest.java
@@ -23,12 +23,9 @@ import org.apache.james.GuiceJamesServer;
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.jmap.methods.integration.GetMessagesMethodTest;
 import org.apache.james.jmap.servers.MemoryJmapServerModule;
-import org.apache.james.mailbox.inmemory.InMemoryId;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class MemoryGetMessagesMethodTest extends GetMessagesMethodTest {
 
     @Rule
@@ -36,7 +33,7 @@ public class MemoryGetMessagesMethodTest extends GetMessagesMethodTest {
 
     @Override
     protected GuiceJamesServer<?> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<InMemoryId>(){})
+        return new GuiceJamesServer<>(MemoryJamesServerMain.inMemoryId)
                     .combineWith(MemoryJamesServerMain.inMemoryServerModule)
                     .overrideWith(new MemoryJmapServerModule(temporaryFolder));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryJmapAuthenticationTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryJmapAuthenticationTest.java
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryJmapAuthenticationTest.java
index 8b91003..ec2ed06 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryJmapAuthenticationTest.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemoryJmapAuthenticationTest.java
@@ -25,12 +25,9 @@ import org.apache.james.jmap.FixedDateZonedDateTimeProvider;
 import org.apache.james.jmap.JMAPAuthenticationTest;
 import org.apache.james.jmap.servers.MemoryJmapServerModule;
 import org.apache.james.jmap.utils.ZonedDateTimeProvider;
-import org.apache.james.mailbox.inmemory.InMemoryId;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class MemoryJmapAuthenticationTest extends JMAPAuthenticationTest {
 
     @Rule
@@ -38,7 +35,7 @@ public class MemoryJmapAuthenticationTest extends JMAPAuthenticationTest
{
 
     @Override
     protected GuiceJamesServer<?> createJmapServer(FixedDateZonedDateTimeProvider zonedDateTimeProvider)
{
-        return new GuiceJamesServer<>(new TypeLiteral<InMemoryId>(){})
+        return new GuiceJamesServer<>(MemoryJamesServerMain.inMemoryId)
                 .combineWith(MemoryJamesServerMain.inMemoryServerModule)
                 .overrideWith(new MemoryJmapServerModule(temporaryFolder),
                              (binder) -> binder.bind(ZonedDateTimeProvider.class).toInstance(zonedDateTimeProvider));

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMailboxesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMailboxesMethodTest.java
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMailboxesMethodTest.java
index 5fadd9b..2d85a6a 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMailboxesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMailboxesMethodTest.java
@@ -23,12 +23,9 @@ import org.apache.james.GuiceJamesServer;
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.jmap.methods.integration.SetMailboxesMethodTest;
 import org.apache.james.jmap.servers.MemoryJmapServerModule;
-import org.apache.james.mailbox.inmemory.InMemoryId;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class MemorySetMailboxesMethodTest extends SetMailboxesMethodTest {
 
     @Rule
@@ -36,7 +33,7 @@ public class MemorySetMailboxesMethodTest extends SetMailboxesMethodTest
{
 
     @Override
     protected GuiceJamesServer<?> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<InMemoryId>(){})
+        return new GuiceJamesServer<>(MemoryJamesServerMain.inMemoryId)
                     .combineWith(MemoryJamesServerMain.inMemoryServerModule)
                     .overrideWith(new MemoryJmapServerModule(temporaryFolder));
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/04978a98/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMessagesMethodTest.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMessagesMethodTest.java
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMessagesMethodTest.java
index e4e65ff..8597cdc 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMessagesMethodTest.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/MemorySetMessagesMethodTest.java
@@ -23,12 +23,9 @@ import org.apache.james.GuiceJamesServer;
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.jmap.methods.integration.SetMessagesMethodTest;
 import org.apache.james.jmap.servers.MemoryJmapServerModule;
-import org.apache.james.mailbox.inmemory.InMemoryId;
 import org.junit.Rule;
 import org.junit.rules.TemporaryFolder;
 
-import com.google.inject.TypeLiteral;
-
 public class MemorySetMessagesMethodTest extends SetMessagesMethodTest {
 
     @Rule
@@ -36,7 +33,7 @@ public class MemorySetMessagesMethodTest extends SetMessagesMethodTest {
 
     @Override
     protected GuiceJamesServer<?> createJmapServer() {
-        return new GuiceJamesServer<>(new TypeLiteral<InMemoryId>(){})
+        return new GuiceJamesServer<>(MemoryJamesServerMain.inMemoryId)
                     .combineWith(MemoryJamesServerMain.inMemoryServerModule)
                     .overrideWith(new MemoryJmapServerModule(temporaryFolder));
     }


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