james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From matth...@apache.org
Subject [3/5] james-project git commit: MAILET-111 FakeMail builder should make it easy to have multiple recipients
Date Tue, 30 Aug 2016 14:56:55 GMT
MAILET-111 FakeMail builder should make it easy to have multiple recipients


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

Branch: refs/heads/master
Commit: ebb4b303d91818249978813d6ef7f496aff79e30
Parents: ce00790
Author: Benoit Tellier <btellier@linagora.com>
Authored: Tue Aug 30 11:51:07 2016 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Tue Aug 30 11:51:07 2016 +0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/mailet/base/test/FakeMail.java    | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/ebb4b303/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMail.java
----------------------------------------------------------------------
diff --git a/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMail.java b/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMail.java
index 1adbf2a..31f0ebb 100644
--- a/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMail.java
+++ b/mailet/base/src/test/java/org/apache/mailet/base/test/FakeMail.java
@@ -40,6 +40,7 @@ import org.apache.mailet.Mail;
 import org.apache.mailet.MailAddress;
 
 import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableList;
 
 public class FakeMail implements Mail {
 
@@ -74,6 +75,11 @@ public class FakeMail implements Mail {
             return this;
         }
 
+        public Builder recipients(MailAddress... recipients) {
+            this.recipients.addAll(ImmutableList.copyOf(recipients));
+            return this;
+        }
+
         public Builder recipient(MailAddress recipient) {
             this.recipients.add(recipient);
             return this;


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