Repository: james-project
Updated Branches:
  refs/heads/master 3aa1732b3 -> 5ceee7866


JAMES-2213 isForwarded getMessages integration test


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

Branch: refs/heads/master
Commit: 5ceee7866af13c6d9d36dc0c86f1d8052274279b
Parents: 39e9e3e
Author: Raphael Ouazana <raphael.ouaz...@linagora.com>
Authored: Mon Nov 13 17:54:25 2017 +0100
Committer: quynhn <qngu...@linagora.com>
Committed: Tue Nov 14 10:27:40 2017 +0700

----------------------------------------------------------------------
 .../cucumber/GetMessagesMethodStepdefs.java           |  5 +++++
 .../src/test/resources/cucumber/GetMessages.feature   | 14 ++++++++++++++
 2 files changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/5ceee786/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 5000ac4..9d353f6 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
@@ -639,6 +639,11 @@ public class GetMessagesMethodStepdefs {
         assertThat(httpClient.jsonPath.<Boolean>read(FIRST_MESSAGE + 
".hasAttachment")).isEqualTo(Boolean.valueOf(hasAttachment));
     }
 
+    @Then("^the isForwarded property of the message is \"([^\"]*)\"$")
+    public void assertIsForwardedOfTheFirstMessage(String isForwarded) throws 
Exception {
+        assertThat(httpClient.jsonPath.<Boolean>read(FIRST_MESSAGE + 
".isForwarded")).isEqualTo(Boolean.valueOf(isForwarded));
+    }
+
     @Then("^the list of attachments of the message is empty$")
     public void assertAttachmentsOfTheFirstMessageIsEmpty() throws Exception {
         
assertThat(httpClient.jsonPath.<List<Object>>read(ATTACHMENTS)).isEmpty();

http://git-wip-us.apache.org/repos/asf/james-project/blob/5ceee786/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
index e786976..f0f8418 100644
--- 
a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
+++ 
b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/resources/cucumber/GetMessages.feature
@@ -406,3 +406,17 @@ Feature: GetMessages method
     Examples:
             |flags                    |keyword                 |
             |"$Flagged,$Forwarded"    |$Forwarded,$Flagged     |
+
+  Scenario: Retrieving message should include true isForwarded property when 
set
+    Given "al...@domain.tld" has a message "m1" in the "inbox" mailbox with 
flags "$Forwarded"
+    When "al...@domain.tld" ask for messages "m1"
+    Then no error is returned
+    And the list should contain 1 message
+    And the isForwarded property of the message is "true"
+
+  Scenario: Retrieving message should include false isForwarded property when 
not set
+    Given "al...@domain.tld" has a message "m1" in the "inbox" mailbox with 
flags "$Answered"
+    When "al...@domain.tld" ask for messages "m1"
+    Then no error is returned
+    And the list should contain 1 message
+    And the isForwarded property of the message is "false"
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to