james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rouaz...@apache.org
Subject [5/6] james-project git commit: MAILBOX-279: change the method name getNotImplemented to getSupportCapabilities and its behavior
Date Mon, 09 Jan 2017 09:13:33 GMT
MAILBOX-279: change the method name getNotImplemented to getSupportCapabilities and its behavior


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

Branch: refs/heads/master
Commit: 60f9dcdfee876d1e5940d8346c6f972205ae7133
Parents: 1ccb1ec
Author: Quynh Nguyen <qnguyen@linagora.com>
Authored: Thu Dec 8 18:11:42 2016 +0700
Committer: Quynh Nguyen <qnguyen@linagora.com>
Committed: Mon Jan 9 15:18:03 2017 +0700

----------------------------------------------------------------------
 .../james/mailbox/cassandra/mail/CassandraMapperProvider.java    | 4 ++--
 .../org/apache/james/mailbox/jpa/mail/JPAMapperProvider.java     | 4 ++--
 .../james/mailbox/inmemory/mail/InMemoryMapperProvider.java      | 4 ++--
 .../james/mailbox/store/mail/model/AnnotationMapperTest.java     | 2 +-
 .../james/mailbox/store/mail/model/AttachmentMapperTest.java     | 2 +-
 .../james/mailbox/store/mail/model/ListMessageAssertTest.java    | 2 +-
 .../apache/james/mailbox/store/mail/model/MailboxMapperTest.java | 2 +-
 .../apache/james/mailbox/store/mail/model/MapperProvider.java    | 2 +-
 .../james/mailbox/store/mail/model/MessageIdMapperTest.java      | 2 +-
 .../apache/james/mailbox/store/mail/model/MessageMapperTest.java | 2 +-
 .../apache/james/mailbox/store/mail/model/MessageMoveTest.java   | 2 +-
 .../store/mail/model/MessageWithAttachmentMapperTest.java        | 4 ++--
 12 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMapperProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMapperProvider.java
b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMapperProvider.java
index 21adfe6..2516944 100644
--- a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMapperProvider.java
+++ b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMapperProvider.java
@@ -134,8 +134,8 @@ public class CassandraMapperProvider implements MapperProvider {
     }
 
     @Override
-    public List<Capabilities> getNotImplemented() {
-        return ImmutableList.of();
+    public List<Capabilities> getSupportedCapabilities() {
+        return ImmutableList.copyOf(Capabilities.values());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/JPAMapperProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/JPAMapperProvider.java
b/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/JPAMapperProvider.java
index 37887a9..df37f39 100644
--- a/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/JPAMapperProvider.java
+++ b/mailbox/jpa/src/test/java/org/apache/james/mailbox/jpa/mail/JPAMapperProvider.java
@@ -136,8 +136,8 @@ public class JPAMapperProvider implements MapperProvider {
     }
 
     @Override
-    public List<Capabilities> getNotImplemented() {
-        return ImmutableList.of(Capabilities.ATTACHMENT, Capabilities.MOVE, Capabilities.UNIQUE_MESSAGE_ID);
+    public List<Capabilities> getSupportedCapabilities() {
+        return ImmutableList.of(Capabilities.ANNOTATION, Capabilities.MAILBOX, Capabilities.MESSAGE);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/mail/InMemoryMapperProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/mail/InMemoryMapperProvider.java
b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/mail/InMemoryMapperProvider.java
index 2bcf079..bc33491 100644
--- a/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/mail/InMemoryMapperProvider.java
+++ b/mailbox/memory/src/test/java/org/apache/james/mailbox/inmemory/mail/InMemoryMapperProvider.java
@@ -93,8 +93,8 @@ public class InMemoryMapperProvider implements MapperProvider {
     }
 
     @Override
-    public List<Capabilities> getNotImplemented() {
-        return ImmutableList.of(Capabilities.UNIQUE_MESSAGE_ID);
+    public List<Capabilities> getSupportedCapabilities() {
+        return ImmutableList.copyOf(Capabilities.values());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AnnotationMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AnnotationMapperTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AnnotationMapperTest.java
index fdefd97..f634ac6 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AnnotationMapperTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AnnotationMapperTest.java
@@ -65,7 +65,7 @@ public class AnnotationMapperTest<T extends MapperProvider> {
     @Contract.Inject
     public final void setProducer(IProducer<T> producer) throws MailboxException {
         T newInstance = producer.newInstance();
-        Assume.assumeFalse(newInstance.getNotImplemented().contains(MapperProvider.Capabilities.ANNOTATION));
+        Assume.assumeTrue(newInstance.getSupportedCapabilities().contains(MapperProvider.Capabilities.ANNOTATION));
 
         this.producer = producer;
         this.annotationMapper = newInstance.createAnnotationMapper();

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AttachmentMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AttachmentMapperTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AttachmentMapperTest.java
index 3640b8a..10706f8 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AttachmentMapperTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/AttachmentMapperTest.java
@@ -52,7 +52,7 @@ public class AttachmentMapperTest<T extends MapperProvider> {
     public final void setProducer(IProducer<T> producer) throws MailboxException {
         this.producer = producer;
         T newInstance = producer.newInstance();
-        Assume.assumeFalse(newInstance.getNotImplemented().contains(MapperProvider.Capabilities.ATTACHMENT));
+        Assume.assumeTrue(newInstance.getSupportedCapabilities().contains(MapperProvider.Capabilities.ATTACHMENT));
         this.attachmentMapper = newInstance.createAttachmentMapper();
     }
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssertTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssertTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssertTest.java
index b123739..a465c65 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssertTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/ListMessageAssertTest.java
@@ -34,7 +34,7 @@ import org.apache.james.mailbox.model.MailboxId;
 import org.apache.james.mailbox.model.MailboxPath;
 import org.apache.james.mailbox.model.MessageAttachment;
 import org.apache.james.mailbox.model.MessageId;
-import org.apache.james.mailbox.store.TestId;
+import org.apache.james.mailbox.model.TestId;
 import org.apache.james.mailbox.store.mail.model.impl.PropertyBuilder;
 import org.apache.james.mailbox.store.mail.model.impl.SimpleMailbox;
 import org.apache.james.mailbox.store.mail.model.impl.SimpleMailboxMessage;

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MailboxMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MailboxMapperTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MailboxMapperTest.java
index c5bf105..36bbf79 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MailboxMapperTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MailboxMapperTest.java
@@ -89,7 +89,7 @@ public class MailboxMapperTest<T extends MapperProvider> {
     @Contract.Inject
     public final void setProducer(IProducer<T> producer) throws MailboxException {
         this.mapperProvider = producer.newInstance();
-        Assume.assumeFalse(mapperProvider.getNotImplemented().contains(MapperProvider.Capabilities.MAILBOX));
+        Assume.assumeTrue(mapperProvider.getSupportedCapabilities().contains(MapperProvider.Capabilities.MAILBOX));
 
         this.producer = producer;
         this.mailboxMapper = mapperProvider.createMailboxMapper();

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MapperProvider.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MapperProvider.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MapperProvider.java
index bbeb072..b6b8f74 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MapperProvider.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MapperProvider.java
@@ -41,7 +41,7 @@ public interface MapperProvider {
         UNIQUE_MESSAGE_ID
     }
 
-    List<Capabilities> getNotImplemented();
+    List<Capabilities> getSupportedCapabilities();
 
     MailboxMapper createMailboxMapper() throws MailboxException;
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageIdMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageIdMapperTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageIdMapperTest.java
index a8b3da0..ebb4b92 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageIdMapperTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageIdMapperTest.java
@@ -87,7 +87,7 @@ public class MessageIdMapperTest<T extends MapperProvider> {
     public final void setProducer(IProducer<T> producer) throws MailboxException {
         this.producer = producer;
         this.mapperProvider = producer.newInstance();
-        Assume.assumeFalse(mapperProvider.getNotImplemented().contains(MapperProvider.Capabilities.UNIQUE_MESSAGE_ID));
+        Assume.assumeTrue(mapperProvider.getSupportedCapabilities().contains(MapperProvider.Capabilities.UNIQUE_MESSAGE_ID));
 
         this.mapperProvider.ensureMapperPrepared();
         this.sut = mapperProvider.createMessageIdMapper();

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMapperTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMapperTest.java
index c45b5b7..ec87df8 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMapperTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMapperTest.java
@@ -92,7 +92,7 @@ public class MessageMapperTest<T extends MapperProvider> {
         this.mapperProvider = producer.newInstance();
         this.mapperProvider.ensureMapperPrepared();
 
-        Assume.assumeFalse(mapperProvider.getNotImplemented().contains(MapperProvider.Capabilities.MESSAGE));
+        Assume.assumeTrue(mapperProvider.getSupportedCapabilities().contains(MapperProvider.Capabilities.MESSAGE));
 
         this.messageMapper = mapperProvider.createMessageMapper();
         this.mailboxMapper = mapperProvider.createMailboxMapper();

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMoveTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMoveTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMoveTest.java
index 5a7e8ae..f3eae89 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMoveTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageMoveTest.java
@@ -70,7 +70,7 @@ public class MessageMoveTest<T extends MapperProvider> {
         this.producer = producer;
         this.mapperProvider = producer.newInstance();
         this.mapperProvider.ensureMapperPrepared();
-        Assume.assumeFalse(mapperProvider.getNotImplemented().contains(MapperProvider.Capabilities.MOVE));
+        Assume.assumeTrue(mapperProvider.getSupportedCapabilities().contains(MapperProvider.Capabilities.MOVE));
         this.messageMapper = mapperProvider.createMessageMapper();
         Assume.assumeNotNull(messageMapper);
 

http://git-wip-us.apache.org/repos/asf/james-project/blob/60f9dcdf/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageWithAttachmentMapperTest.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageWithAttachmentMapperTest.java
b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageWithAttachmentMapperTest.java
index ff9242d..6844d36 100644
--- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageWithAttachmentMapperTest.java
+++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/mail/model/MessageWithAttachmentMapperTest.java
@@ -82,8 +82,8 @@ public class MessageWithAttachmentMapperTest<T extends MapperProvider>
{
         this.mapperProvider = producer.newInstance();
         this.mapperProvider.ensureMapperPrepared();
 
-        Assume.assumeFalse(mapperProvider.getNotImplemented().contains(MapperProvider.Capabilities.MESSAGE));
-        Assume.assumeFalse(mapperProvider.getNotImplemented().contains(MapperProvider.Capabilities.ATTACHMENT));
+        Assume.assumeTrue(mapperProvider.getSupportedCapabilities().contains(MapperProvider.Capabilities.MESSAGE));
+        Assume.assumeTrue(mapperProvider.getSupportedCapabilities().contains(MapperProvider.Capabilities.ATTACHMENT));
 
         this.messageMapper = mapperProvider.createMessageMapper();
         this.attachmentMapper = mapperProvider.createAttachmentMapper();


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