Repository: james-project Updated Branches: refs/heads/master 812b9129f -> d59881815
JAMES-1716 remove logic duplication to get a mailbox Id Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/fe2c10b4 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/fe2c10b4 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/fe2c10b4 Branch: refs/heads/master Commit: fe2c10b48ee4f8cbaea7c315c688e8fec4b25c42 Parents: 192971e Author: Matthieu Baechler <[email protected]> Authored: Mon Jun 20 16:01:21 2016 +0200 Committer: Antoine Duprat <[email protected]> Committed: Thu Jul 7 12:01:50 2016 +0200 ---------------------------------------------------------------------- .../methods/integration/SetMessagesMethodTest.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/fe2c10b4/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java index 20bf940..ff6ded2 100644 --- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java +++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/SetMessagesMethodTest.java @@ -752,10 +752,7 @@ public abstract class SetMessagesMethodTest { public void setMessagesShouldMoveMessageInSentWhenMessageIsSent() throws MailboxException { // Given jmapServer.serverProbe().createMailbox(MailboxConstants.USER_NAMESPACE, username, "sent"); - String sentMailboxId = getAllMailboxesIds(accessToken).stream() - .filter(x -> x.get("role").equals("sent")) - .map(x -> x.get("id")) - .findFirst().get(); + String sentMailboxId = getMailboxId(accessToken, Role.SENT); String fromAddress = username; String messageCreationId = "user|inbox|1"; @@ -954,10 +951,7 @@ public abstract class SetMessagesMethodTest { @Test public void setMessagesShouldMoveToSentWhenSendingMessageWithOnlyFromAddress() { jmapServer.serverProbe().createMailbox(MailboxConstants.USER_NAMESPACE, username, "sent"); - String sentMailboxId = getAllMailboxesIds(accessToken).stream() - .filter(x -> x.get("role").equals("sent")) - .map(x -> x.get("id")) - .findFirst().get(); + String sentMailboxId = getMailboxId(accessToken, Role.SENT); String messageCreationId = "user|inbox|1"; String fromAddress = username; @@ -1166,10 +1160,7 @@ public abstract class SetMessagesMethodTest { public void setMessagesShouldKeepBccInSentMailbox() throws Exception { // Sender jmapServer.serverProbe().createMailbox(MailboxConstants.USER_NAMESPACE, username, "sent"); - String sentMailboxId = getAllMailboxesIds(accessToken).stream() - .filter(x -> x.get("role").equals("sent")) - .map(x -> x.get("id")) - .findFirst().get(); + String sentMailboxId = getMailboxId(accessToken, Role.SENT); // Recipient String recipientAddress = "recipient" + "@" + USERS_DOMAIN; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
