james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [2/3] james-project git commit: JAMES-1900 anonimizing addresses in HeaderCollectionTest
Date Fri, 05 May 2017 01:59:13 GMT
JAMES-1900 anonimizing addresses in HeaderCollectionTest


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

Branch: refs/heads/master
Commit: f34b6fe6586bf2127d9e7ff5ae51f60ad127dc47
Parents: ff33b0c
Author: benwa <btellier@linagora.com>
Authored: Thu May 4 15:01:17 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Thu May 4 16:37:04 2017 +0700

----------------------------------------------------------------------
 .../json/HeaderCollectionTest.java              | 48 ++++++++++----------
 1 file changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/f34b6fe6/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/HeaderCollectionTest.java
----------------------------------------------------------------------
diff --git a/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/HeaderCollectionTest.java
b/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/HeaderCollectionTest.java
index 69ebc6f..88efd00 100644
--- a/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/HeaderCollectionTest.java
+++ b/mailbox/elasticsearch/src/test/java/org/apache/james/mailbox/elasticsearch/json/HeaderCollectionTest.java
@@ -32,52 +32,52 @@ public class HeaderCollectionTest {
     @Test
     public void simpleValueAddressHeaderShouldBeAddedToTheAddressSet() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("To", "btellier@linagora.com"))
+            .add(new FieldImpl("To", "ben.tellier@linagora.com"))
             .build();
 
         assertThat(headerCollection.getToAddressSet())
-            .containsOnly(new EMailer("btellier@linagora.com", "btellier@linagora.com"));
+            .containsOnly(new EMailer("ben.tellier@linagora.com", "ben.tellier@linagora.com"));
     }
 
     @Test
     public void comaSeparatedAddressShouldBeBothAddedToTheAddressSet() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("To", "btellier@linagora.com, benwa@minet.net"))
+            .add(new FieldImpl("To", "ben.tellier@linagora.com, btellier@minet.net"))
             .build();
 
         assertThat(headerCollection.getToAddressSet())
             .containsOnly(
-                new EMailer("btellier@linagora.com", "btellier@linagora.com"),
-                new EMailer("benwa@minet.net", "benwa@minet.net"));
+                new EMailer("ben.tellier@linagora.com", "ben.tellier@linagora.com"),
+                new EMailer("btellier@minet.net", "btellier@minet.net"));
     }
 
     @Test
     public void addressesOfTwoFieldsHavingTheSameNameShouldBeMerged() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("To", "btellier@linagora.com"))
-            .add(new FieldImpl("To", "btellier@linagora.com, benwa@minet.net"))
+            .add(new FieldImpl("To", "ben.tellier@linagora.com"))
+            .add(new FieldImpl("To", "ben.tellier@linagora.com, btellier@minet.net"))
             .build();
 
         assertThat(headerCollection.getToAddressSet())
             .containsOnly(
-                new EMailer("btellier@linagora.com", "btellier@linagora.com"),
-                new EMailer("benwa@minet.net", "benwa@minet.net"));
+                new EMailer("ben.tellier@linagora.com", "ben.tellier@linagora.com"),
+                new EMailer("btellier@minet.net", "btellier@minet.net"));
     }
 
     @Test
     public void displayNamesShouldBeRetreived() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("To", "Christophe Hamerling <chamerling@linagora.com>"))
+            .add(new FieldImpl("To", "Christophe Hamerling <chri.hamerling@linagora.com>"))
             .build();
 
         assertThat(headerCollection.getToAddressSet())
-            .containsOnly(new EMailer("Christophe Hamerling", "chamerling@linagora.com"));
+            .containsOnly(new EMailer("Christophe Hamerling", "chri.hamerling@linagora.com"));
     }
 
     @Test
     public void displayNamesShouldBeRetrievedWhenEncodedWord() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("From", "=?UTF-8?B?RnLDqWTDqXJpYyBNQVJUSU4=?= <fmartin@linagora.com>,
Graham CROSMARIE <gcrosmarie@linagora.com>"))
+            .add(new FieldImpl("From", "=?UTF-8?B?RnLDqWTDqXJpYyBNQVJUSU4=?= <fred.martin@linagora.com>,
Graham CROSMARIE <grah.crosmarie@linagora.com>"))
             .build();
 
         assertThat(headerCollection.getFromAddressSet())
@@ -88,54 +88,54 @@ public class HeaderCollectionTest {
     @Test
     public void addressWithTwoDisplayNamesOnTheSameFieldShouldBeRetrieved() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("From", "Christophe Hamerling <chamerling@linagora.com>,
Graham CROSMARIE <gcrosmarie@linagora.com>"))
+            .add(new FieldImpl("From", "Christophe Hamerling <chri.hamerling@linagora.com>,
Graham CROSMARIE <grah.crosmarie@linagora.com>"))
             .build();
 
         assertThat(headerCollection.getFromAddressSet())
-            .containsOnly(new EMailer("Christophe Hamerling", "chamerling@linagora.com"),
-                new EMailer("Graham CROSMARIE", "gcrosmarie@linagora.com"));
+            .containsOnly(new EMailer("Christophe Hamerling", "chri.hamerling@linagora.com"),
+                new EMailer("Graham CROSMARIE", "grah.crosmarie@linagora.com"));
 
     }
 
     @Test
     public void mixingAddressWithDisplayNamesWithOthersShouldBeAllowed() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("To", "Christophe Hamerling <chamerling@linagora.com>,
gcrosmarie@linagora.com"))
+            .add(new FieldImpl("To", "Christophe Hamerling <chri.hamerling@linagora.com>,
grah.crosmarie@linagora.com"))
             .build();
 
         assertThat(headerCollection.getToAddressSet())
-            .containsOnly(new EMailer("Christophe Hamerling", "chamerling@linagora.com"),
-                new EMailer("gcrosmarie@linagora.com", "gcrosmarie@linagora.com"));
+            .containsOnly(new EMailer("Christophe Hamerling", "chri.hamerling@linagora.com"),
+                new EMailer("grah.crosmarie@linagora.com", "grah.crosmarie@linagora.com"));
     }
 
     @Test
     public void displayNamesShouldBeRetreivedOnCc() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("Cc", "Christophe Hamerling <chamerling@linagora.com>"))
+            .add(new FieldImpl("Cc", "Christophe Hamerling <chri.hamerling@linagora.com>"))
             .build();
 
         assertThat(headerCollection.getCcAddressSet())
-            .containsOnly(new EMailer("Christophe Hamerling", "chamerling@linagora.com"));
+            .containsOnly(new EMailer("Christophe Hamerling", "chri.hamerling@linagora.com"));
     }
 
     @Test
     public void displayNamesShouldBeRetreivedOnReplyTo() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("Reply-To", "Christophe Hamerling <chamerling@linagora.com>"))
+            .add(new FieldImpl("Reply-To", "Christophe Hamerling <chri.hamerling@linagora.com>"))
             .build();
 
         assertThat(headerCollection.getReplyToAddressSet())
-            .containsOnly(new EMailer("Christophe Hamerling", "chamerling@linagora.com"));
+            .containsOnly(new EMailer("Christophe Hamerling", "chri.hamerling@linagora.com"));
     }
 
     @Test
     public void displayNamesShouldBeRetreivedOnBcc() {
         HeaderCollection headerCollection = HeaderCollection.builder()
-            .add(new FieldImpl("Bcc", "Christophe Hamerling <chamerling@linagora.com>"))
+            .add(new FieldImpl("Bcc", "Christophe Hamerling <chri.hamerling@linagora.com>"))
             .build();
 
         assertThat(headerCollection.getBccAddressSet())
-            .containsOnly(new EMailer("Christophe Hamerling", "chamerling@linagora.com"));
+            .containsOnly(new EMailer("Christophe Hamerling", "chri.hamerling@linagora.com"));
     }
 
     @Test


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