james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [27/29] james-project git commit: JAMES-1842: Remove Generics on Cucumber stuffs
Date Fri, 18 Nov 2016 09:54:20 GMT
JAMES-1842: Remove Generics on Cucumber stuffs


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

Branch: refs/heads/master
Commit: e849d6ed84b8a08222ec03d7f098ec61382ea532
Parents: f11fa61
Author: Antoine Duprat <aduprat@apache.org>
Authored: Wed Nov 16 10:21:24 2016 +0100
Committer: Quynh Nguyen <qnguyen@linagora.com>
Committed: Fri Nov 18 09:33:20 2016 +0700

----------------------------------------------------------------------
 .../james/jmap/cassandra/cucumber/CassandraStepdefs.java |  4 ++--
 .../methods/integration/cucumber/DownloadStepdefs.java   | 11 ++++-------
 .../integration/cucumber/GetMessagesMethodStepdefs.java  | 11 ++++-------
 .../jmap/methods/integration/cucumber/MainStepdefs.java  |  8 +++-----
 .../integration/cucumber/SetMailboxesMethodStepdefs.java | 11 ++++-------
 .../methods/integration/cucumber/UploadStepdefs.java     | 11 ++++-------
 .../jmap/methods/integration/cucumber/UserStepdefs.java  |  9 +++------
 .../james/jmap/memory/cucumber/MemoryStepdefs.java       |  4 ++--
 8 files changed, 26 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/e849d6ed/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraStepdefs.java
b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraStepdefs.java
index 2e3ea82..39f4b65 100644
--- a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraStepdefs.java
+++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/cucumber/CassandraStepdefs.java
@@ -40,13 +40,13 @@ import cucumber.runtime.java.guice.ScenarioScoped;
 @ScenarioScoped
 public class CassandraStepdefs {
 
-    private final MainStepdefs<CassandraJamesServer> mainStepdefs;
+    private final MainStepdefs mainStepdefs;
     private TemporaryFolder temporaryFolder = new TemporaryFolder();
     private EmbeddedElasticSearch embeddedElasticSearch = new EmbeddedElasticSearch(temporaryFolder);
     private EmbeddedCassandra cassandra = EmbeddedCassandra.createStartServer();
 
     @Inject
-    private CassandraStepdefs(MainStepdefs<CassandraJamesServer> mainStepdefs) {
+    private CassandraStepdefs(MainStepdefs mainStepdefs) {
         this.mainStepdefs = mainStepdefs;
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/e849d6ed/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
index 50fbe6a..d000bb3 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/DownloadStepdefs.java
@@ -37,9 +37,6 @@ import org.apache.http.HttpResponse;
 import org.apache.http.client.fluent.Request;
 import org.apache.http.client.fluent.Response;
 import org.apache.http.client.utils.URIBuilder;
-import org.apache.james.GuiceJamesServerImpl;
-import org.apache.james.JmapServer;
-import org.apache.james.WebAdminServer;
 import org.apache.james.jmap.api.access.AccessToken;
 import org.apache.james.jmap.model.AttachmentAccessToken;
 import org.apache.james.mailbox.model.MailboxConstants;
@@ -59,7 +56,7 @@ import cucumber.api.java.en.When;
 import cucumber.runtime.java.guice.ScenarioScoped;
 
 @ScenarioScoped
-public class DownloadStepdefs <T extends GuiceJamesServerImpl & JmapServer & WebAdminServer>
{
+public class DownloadStepdefs {
 
     private static final String ONE_ATTACHMENT_EML_ATTACHEMENT_BLOB_ID = "4000c5145f633410b80be368c44e1c394bff9437";
     private static final String EXPIRED_ATTACHMENT_TOKEN = "usera@domain.tld_"
@@ -70,15 +67,15 @@ public class DownloadStepdefs <T extends GuiceJamesServerImpl &
JmapServer & Web
             + "DiZa0O14MjLWrAA8P6MG35Gt5CBp7mt5U1EH/M++rIoZK7nlGJ4dPW0dvZD7h4m3o5b/Yd8DXU5x2x4+s0HOOKzD7X0RMlsU7JHJMNLvTvRGWF/C+MUyC8Zce7DtnRVPEQX2uAZhL2PBABV07Vpa8kH+NxoS9CL955Bc1Obr4G+KN2JorADlocFQA6ElXryF5YS/HPZSvq1MTC6aJIP0ku8WRpRnbwgwJnn26YpcHXcJjbkCBtd9/BhlMV6xNd2hTBkfZmYdoNo+UKBaXWzLxAlbLuxjpxwvDNJfOEyWFPgHDoRvzP+G7KzhVWjanHAHrhF0GilEa/MKpOI1qHBSwA==";
     private static final String UTF8_CONTENT_DIPOSITION_START = "Content-Disposition: attachment;
filename*=\"";
 
-    private final UserStepdefs<T> userStepdefs;
-    private final MainStepdefs<T> mainStepdefs;
+    private final UserStepdefs userStepdefs;
+    private final MainStepdefs mainStepdefs;
     private HttpResponse response;
     private Multimap<String, String> attachmentsByMessageId;
     private Map<String, String> blobIdByAttachmentId;
     private Map<AttachmentAccessTokenKey, AttachmentAccessToken> attachmentAccessTokens;
 
     @Inject
-    private DownloadStepdefs(MainStepdefs<T> mainStepdefs, UserStepdefs<T> userStepdefs)
{
+    private DownloadStepdefs(MainStepdefs mainStepdefs, UserStepdefs userStepdefs) {
         this.mainStepdefs = mainStepdefs;
         this.userStepdefs = userStepdefs;
         this.attachmentsByMessageId = ArrayListMultimap.create();

http://git-wip-us.apache.org/repos/asf/james-project/blob/e849d6ed/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
index 07e28ff..5bbc254 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/GetMessagesMethodStepdefs.java
@@ -38,9 +38,6 @@ import javax.mail.Flags;
 import org.apache.commons.lang3.StringEscapeUtils;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.fluent.Request;
-import org.apache.james.GuiceJamesServerImpl;
-import org.apache.james.JmapServer;
-import org.apache.james.WebAdminServer;
 import org.apache.james.jmap.methods.integration.cucumber.util.TableRow;
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxPath;
@@ -60,7 +57,7 @@ import cucumber.api.java.en.When;
 import cucumber.runtime.java.guice.ScenarioScoped;
 
 @ScenarioScoped
-public class GetMessagesMethodStepdefs <T extends GuiceJamesServerImpl & JmapServer
& WebAdminServer> {
+public class GetMessagesMethodStepdefs {
 
     private static final Optional<Map<String, String>> NO_HEADERS = Optional.empty();
     private static final String NAME = "[0][0]";
@@ -71,14 +68,14 @@ public class GetMessagesMethodStepdefs <T extends GuiceJamesServerImpl
& JmapSer
     private static final String SECOND_ATTACHMENT = ATTACHMENTS + "[1]";
 
 
-    private final MainStepdefs<T> mainStepdefs;
-    private final UserStepdefs<T> userStepdefs;
+    private final MainStepdefs mainStepdefs;
+    private final UserStepdefs userStepdefs;
 
     private HttpResponse response;
     private DocumentContext jsonPath;
 
     @Inject
-    private GetMessagesMethodStepdefs(MainStepdefs<T> mainStepdefs, UserStepdefs<T>
userStepdefs) {
+    private GetMessagesMethodStepdefs(MainStepdefs mainStepdefs, UserStepdefs userStepdefs)
{
         this.mainStepdefs = mainStepdefs;
         this.userStepdefs = userStepdefs;
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/e849d6ed/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java
index e4e4959..7f70ef2 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java
@@ -20,18 +20,16 @@
 package org.apache.james.jmap.methods.integration.cucumber;
 
 import org.apache.http.client.utils.URIBuilder;
-import org.apache.james.GuiceJamesServerImpl;
-import org.apache.james.JmapServer;
-import org.apache.james.WebAdminServer;
+import org.apache.james.JmapJamesServer;
 
 import com.google.common.base.Charsets;
 
 import cucumber.runtime.java.guice.ScenarioScoped;
 
 @ScenarioScoped
-public class MainStepdefs<T extends GuiceJamesServerImpl & JmapServer & WebAdminServer>
{
+public class MainStepdefs {
 
-    public T jmapServer;
+    public JmapJamesServer jmapServer;
     public Runnable awaitMethod = () -> {};
 
     public void init() throws Exception {

http://git-wip-us.apache.org/repos/asf/james-project/blob/e849d6ed/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java
index a8dc46e..b2fed83 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java
@@ -32,9 +32,6 @@ import javax.mail.Flags;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.fluent.Request;
 import org.apache.http.entity.ContentType;
-import org.apache.james.GuiceJamesServerImpl;
-import org.apache.james.JmapServer;
-import org.apache.james.WebAdminServer;
 import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailbox.model.MailboxPath;
@@ -50,16 +47,16 @@ import cucumber.api.java.en.When;
 import cucumber.runtime.java.guice.ScenarioScoped;
 
 @ScenarioScoped
-public class SetMailboxesMethodStepdefs <T extends GuiceJamesServerImpl & JmapServer
& WebAdminServer> {
+public class SetMailboxesMethodStepdefs {
 
     private static final String NAME = "[0][0]";
     private static final String ARGUMENTS = "[0][1]";
 
-    private final MainStepdefs<T> mainStepdefs;
-    private final UserStepdefs<T> userStepdefs;
+    private final MainStepdefs mainStepdefs;
+    private final UserStepdefs userStepdefs;
 
     @Inject
-    private SetMailboxesMethodStepdefs(MainStepdefs<T> mainStepdefs, UserStepdefs<T>
userStepdefs) {
+    private SetMailboxesMethodStepdefs(MainStepdefs mainStepdefs, UserStepdefs userStepdefs)
{
         this.mainStepdefs = mainStepdefs;
         this.userStepdefs = userStepdefs;
     }

http://git-wip-us.apache.org/repos/asf/james-project/blob/e849d6ed/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java
index d1e26bd..8bcfca2 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UploadStepdefs.java
@@ -32,9 +32,6 @@ import org.apache.http.HttpResponse;
 import org.apache.http.client.fluent.Executor;
 import org.apache.http.client.fluent.Request;
 import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.james.GuiceJamesServerImpl;
-import org.apache.james.JmapServer;
-import org.apache.james.WebAdminServer;
 import org.apache.james.jmap.api.access.AccessToken;
 import org.apache.james.util.ZeroedInputStream;
 
@@ -47,18 +44,18 @@ import cucumber.api.java.en.When;
 import cucumber.runtime.java.guice.ScenarioScoped;
 
 @ScenarioScoped
-public class UploadStepdefs <T extends GuiceJamesServerImpl & JmapServer & WebAdminServer>{
+public class UploadStepdefs {
     private static final String _1M_ZEROED_FILE_BLOB_ID = "3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3";
     private static final int _1M = 1024 * 1024;
     private static final int _10M = 10 * _1M;
 
-    private final UserStepdefs<T> userStepdefs;
-    private final MainStepdefs<T> mainStepdefs;
+    private final UserStepdefs userStepdefs;
+    private final MainStepdefs mainStepdefs;
     private final URI uploadUri;
     private HttpResponse response;
 
     @Inject
-    private UploadStepdefs(UserStepdefs<T> userStepdefs, MainStepdefs<T> mainStepdefs)
throws URISyntaxException {
+    private UploadStepdefs(UserStepdefs userStepdefs, MainStepdefs mainStepdefs) throws URISyntaxException
{
         this.userStepdefs = userStepdefs;
         this.mainStepdefs = mainStepdefs;
         uploadUri = mainStepdefs.baseUri().setPath("/upload").build();

http://git-wip-us.apache.org/repos/asf/james-project/blob/e849d6ed/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UserStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UserStepdefs.java
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UserStepdefs.java
index 7fae1db..c805105 100644
--- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UserStepdefs.java
+++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/UserStepdefs.java
@@ -27,9 +27,6 @@ import java.util.Set;
 
 import javax.inject.Inject;
 
-import org.apache.james.GuiceJamesServerImpl;
-import org.apache.james.JmapServer;
-import org.apache.james.WebAdminServer;
 import org.apache.james.jmap.HttpJmapAuthentication;
 import org.apache.james.jmap.api.access.AccessToken;
 import org.apache.james.mailbox.model.MailboxConstants;
@@ -44,9 +41,9 @@ import cucumber.api.java.en.Given;
 import cucumber.runtime.java.guice.ScenarioScoped;
 
 @ScenarioScoped
-public class UserStepdefs <T extends GuiceJamesServerImpl & JmapServer & WebAdminServer>{
+public class UserStepdefs {
 
-    private final MainStepdefs<T> mainStepdefs;
+    private final MainStepdefs mainStepdefs;
     
     protected Map<String, String> passwordByUser;
     protected Set<String> domains;
@@ -54,7 +51,7 @@ public class UserStepdefs <T extends GuiceJamesServerImpl & JmapServer
& WebAdmi
     protected String lastConnectedUser;
     
     @Inject
-    private UserStepdefs(MainStepdefs<T> mainStepdefs) {
+    private UserStepdefs(MainStepdefs mainStepdefs) {
         this.mainStepdefs = mainStepdefs;
         this.domains = new HashSet<>();
         this.passwordByUser = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/james-project/blob/e849d6ed/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryStepdefs.java
----------------------------------------------------------------------
diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryStepdefs.java
b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryStepdefs.java
index da4c95e..fc36fc7 100644
--- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryStepdefs.java
+++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryStepdefs.java
@@ -34,11 +34,11 @@ import cucumber.runtime.java.guice.ScenarioScoped;
 @ScenarioScoped
 public class MemoryStepdefs {
 
-    private final MainStepdefs<MemoryJamesServer> mainStepdefs;
+    private final MainStepdefs mainStepdefs;
     private final TemporaryFolder temporaryFolder;
 
     @Inject
-    private MemoryStepdefs(MainStepdefs<MemoryJamesServer> mainStepdefs) {
+    private MemoryStepdefs(MainStepdefs mainStepdefs) {
         this.mainStepdefs = mainStepdefs;
         this.temporaryFolder = new 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