http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/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 af217d6..31f617d 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 @@ -112,7 +112,7 @@ public abstract class SetMessagesMethodTest { private static final int SMTP_PORT = 1025; private static final int IMAP_PORT = 1143; private static final String FORWARDED = "$Forwarded"; - private static final int _1MB = 1024*1024; + private static final int _1MB = 1024 * 1024; private static final String NAME = "[0][0]"; private static final String ARGUMENTS = "[0][1]"; private static final String SECOND_NAME = "[1][0]"; @@ -322,7 +322,7 @@ public abstract class SetMessagesMethodTest { // When given() .header("Authorization", accessToken.serialize()) - .body("[[\"setMessages\", {\"destroy\": [\""+ message.getMessageId().serialize() +"\"]}, \"#0\"]]") + .body("[[\"setMessages\", {\"destroy\": [\"" + message.getMessageId().serialize() + "\"]}, \"#0\"]]") .when() .post("/jmap") .then() @@ -459,8 +459,8 @@ public abstract class SetMessagesMethodTest { .then() .log().ifValidationFails() .body(NOT_UPDATED, hasKey(messageId)) - .body(NOT_UPDATED + "[\""+messageId+"\"].type", equalTo("invalidProperties")) - .body(NOT_UPDATED + "[\""+messageId+"\"].description", containsString("Does not support keyword and is* at the same time")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].type", equalTo("invalidProperties")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].description", containsString("Does not support keyword and is* at the same time")) .body(ARGUMENTS + ".updated", hasSize(0)); } @@ -581,8 +581,8 @@ public abstract class SetMessagesMethodTest { .then() .log().ifValidationFails() .body(NOT_UPDATED, hasKey(messageId)) - .body(NOT_UPDATED + "[\""+messageId+"\"].type", equalTo("invalidProperties")) - .body(NOT_UPDATED + "[\""+messageId+"\"].description", containsString("Does not allow to update 'Deleted' or 'Recent' flag")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].type", equalTo("invalidProperties")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].description", containsString("Does not allow to update 'Deleted' or 'Recent' flag")) .body(ARGUMENTS + ".updated", hasSize(0)); } @@ -604,8 +604,8 @@ public abstract class SetMessagesMethodTest { .then() .log().ifValidationFails() .body(NOT_UPDATED, hasKey(messageId)) - .body(NOT_UPDATED + "[\""+messageId+"\"].type", equalTo("invalidProperties")) - .body(NOT_UPDATED + "[\""+messageId+"\"].description", containsString("Does not allow to update 'Deleted' or 'Recent' flag")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].type", equalTo("invalidProperties")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].description", containsString("Does not allow to update 'Deleted' or 'Recent' flag")) .body(ARGUMENTS + ".updated", hasSize(0)); } @@ -870,9 +870,9 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(NOT_UPDATED, hasKey(messageId)) - .body(NOT_UPDATED + "[\""+messageId+"\"].type", equalTo("invalidProperties")) - .body(NOT_UPDATED + "[\""+messageId+"\"].properties[0]", equalTo("isUnread")) - .body(NOT_UPDATED + "[\""+messageId+"\"].description", equalTo("isUnread: Can not construct instance of java.lang.Boolean from String value '123': only \"true\" or \"false\" recognized\n" + + .body(NOT_UPDATED + "[\"" + messageId + "\"].type", equalTo("invalidProperties")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].properties[0]", equalTo("isUnread")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].description", equalTo("isUnread: Can not construct instance of java.lang.Boolean from String value '123': only \"true\" or \"false\" recognized\n" + " at [Source: {\"isUnread\":\"123\"}; line: 1, column: 2] (through reference chain: org.apache.james.jmap.model.Builder[\"isUnread\"])")) .body(ARGUMENTS + ".updated", hasSize(0)); } @@ -898,10 +898,10 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(NOT_UPDATED, hasKey(messageId)) - .body(NOT_UPDATED + "[\""+messageId+"\"].type", equalTo("invalidProperties")) - .body(NOT_UPDATED + "[\""+messageId+"\"].properties", hasSize(2)) - .body(NOT_UPDATED + "[\""+messageId+"\"].properties[0]", equalTo("isUnread")) - .body(NOT_UPDATED + "[\""+messageId+"\"].properties[1]", equalTo("isFlagged")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].type", equalTo("invalidProperties")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].properties", hasSize(2)) + .body(NOT_UPDATED + "[\"" + messageId + "\"].properties[0]", equalTo("isUnread")) + .body(NOT_UPDATED + "[\"" + messageId + "\"].properties[1]", equalTo("isFlagged")) .body(ARGUMENTS + ".updated", hasSize(0)); } @@ -1018,8 +1018,8 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(NOT_UPDATED, hasKey(nonExistingMessageId)) - .body(NOT_UPDATED + "[\""+nonExistingMessageId+"\"].type", equalTo("notFound")) - .body(NOT_UPDATED + "[\""+nonExistingMessageId+"\"].description", equalTo("message not found")) + .body(NOT_UPDATED + "[\"" + nonExistingMessageId + "\"].type", equalTo("notFound")) + .body(NOT_UPDATED + "[\"" + nonExistingMessageId + "\"].description", equalTo("message not found")) .body(ARGUMENTS + ".updated", hasSize(0)); } @@ -1029,7 +1029,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1080,7 +1080,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1105,7 +1105,7 @@ public abstract class SetMessagesMethodTest { .body(ARGUMENTS + ".notCreated", aMapWithSize(0)) .body(ARGUMENTS + ".created", aMapWithSize(1)) .body(ARGUMENTS + ".created", hasKey(messageCreationId)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].subject", equalTo("")); + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].subject", equalTo("")); } @Test @@ -1114,7 +1114,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1139,7 +1139,7 @@ public abstract class SetMessagesMethodTest { .body(ARGUMENTS + ".notCreated", aMapWithSize(0)) .body(ARGUMENTS + ".created", aMapWithSize(1)) .body(ARGUMENTS + ".created", hasKey(messageCreationId)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].subject", equalTo("")); + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].subject", equalTo("")); } @Test @@ -1148,7 +1148,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1182,7 +1182,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1207,7 +1207,7 @@ public abstract class SetMessagesMethodTest { .body(ARGUMENTS + ".notCreated", aMapWithSize(0)) .body(ARGUMENTS + ".created", aMapWithSize(1)) .body(ARGUMENTS + ".created", hasKey(messageCreationId)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].subject", equalTo("ØªØµÙØ± ÙØ§Ø¶Ø ÙÙØ¹ÙØ§ÙØ© بÙ٠اÙÙÙ ÙØ°Ø¬ Ø§ÙØ±Ùاض٠اÙ٠ثاÙÙ ÙÙ ÙØ¸ÙÙ Ø© Ø§ÙØ¸ÙØ§ÙØ±")); + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].subject", equalTo("ØªØµÙØ± ÙØ§Ø¶Ø ÙÙØ¹ÙØ§ÙØ© بÙ٠اÙÙÙ ÙØ°Ø¬ Ø§ÙØ±Ùاض٠اÙ٠ثاÙÙ ÙÙ ÙØ¸ÙÙ Ø© Ø§ÙØ¸ÙØ§ÙØ±")); } @Test @@ -1222,7 +1222,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1246,9 +1246,9 @@ public abstract class SetMessagesMethodTest { .body(NAME, equalTo("messagesSet")) .body(NAME, equalTo("messagesSet")) .body(ARGUMENTS + ".notCreated", hasKey(messageCreationId)) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].type", equalTo("error")) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].properties", contains("mailboxIds")) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].description", endsWith("MailboxId invalid")); + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].type", equalTo("error")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].properties", contains("mailboxIds")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].description", endsWith("MailboxId invalid")); } @Test @@ -1257,7 +1257,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1291,7 +1291,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1317,8 +1317,8 @@ public abstract class SetMessagesMethodTest { .body(ARGUMENTS + ".notCreated", aMapWithSize(0)) .body(ARGUMENTS + ".created", aMapWithSize(1)) .body(ARGUMENTS + ".created", hasKey(messageCreationId)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].keywords.$Answered", equalTo(true)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].keywords.$Flagged", equalTo(true)); + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].keywords.$Answered", equalTo(true)) + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].keywords.$Flagged", equalTo(true)); } @Test @@ -1327,7 +1327,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1363,7 +1363,7 @@ public abstract class SetMessagesMethodTest { String draftId = getDraftId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1405,7 +1405,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1439,7 +1439,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1478,7 +1478,7 @@ public abstract class SetMessagesMethodTest { String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1512,7 +1512,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1546,7 +1546,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1588,14 +1588,14 @@ public abstract class SetMessagesMethodTest { String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + " \"to\": [{ \"name\": \"BOB\", \"email\": \"[email protected]\"}]," + " \"subject\": \"subject\"," + " \"keywords\": {\"$Draft\": true}," + - " \"mailboxIds\": [\"" + getDraftId(accessToken) + "\", \"" +getOutboxId(accessToken) + "\"]" + + " \"mailboxIds\": [\"" + getDraftId(accessToken) + "\", \"" + getOutboxId(accessToken) + "\"]" + " }}" + " }," + " \"#0\"" + @@ -1625,7 +1625,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1646,7 +1646,7 @@ public abstract class SetMessagesMethodTest { .post("/jmap") .then() .extract() - .path(ARGUMENTS + ".created[\""+messageCreationId+"\"].id"); + .path(ARGUMENTS + ".created[\"" + messageCreationId + "\"].id"); String firstMessage = ARGUMENTS + ".list[0]"; given() @@ -1666,7 +1666,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"[email protected]\"}," + @@ -1699,7 +1699,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"invalid\"}," + @@ -1732,7 +1732,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"to\": [{ \"name\": \"BOB\", \"email\": \"[email protected]\"}]," + @@ -1764,7 +1764,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"[email protected]\"}," + @@ -1797,7 +1797,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1834,7 +1834,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1879,7 +1879,7 @@ public abstract class SetMessagesMethodTest { uploadAttachment(attachment); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -1922,7 +1922,7 @@ public abstract class SetMessagesMethodTest { uploadAttachment(attachment); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"subject\": \"subject\"," + @@ -1967,7 +1967,7 @@ public abstract class SetMessagesMethodTest { String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"subject\": \"subject\"," + @@ -2002,7 +2002,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String createDraft = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + draftCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -2027,7 +2027,7 @@ public abstract class SetMessagesMethodTest { String moveDraftToOutBox = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + draftId + "\" : {" + " \"keywords\": {}," + @@ -2052,7 +2052,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String createDraft = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + draftCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -2077,7 +2077,7 @@ public abstract class SetMessagesMethodTest { String copyDraftToOutBox = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + draftId + "\" : {" + " \"keywords\": {\"$Draft\":true}," + @@ -2097,10 +2097,10 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(ARGUMENTS + ".notUpdated", hasKey(draftId)) - .body(ARGUMENTS + ".notUpdated[\""+draftId+"\"].type", equalTo("invalidProperties")) - .body(ARGUMENTS + ".notUpdated[\""+draftId+"\"].description", endsWith("When moving a message to Outbox, only Outboxes mailboxes should be targeted.")) - .body(ARGUMENTS + ".notUpdated[\""+draftId+"\"].properties", hasSize(1)) - .body(ARGUMENTS + ".notUpdated[\""+draftId+"\"].properties", contains("mailboxIds")) + .body(ARGUMENTS + ".notUpdated[\"" + draftId + "\"].type", equalTo("invalidProperties")) + .body(ARGUMENTS + ".notUpdated[\"" + draftId + "\"].description", endsWith("When moving a message to Outbox, only Outboxes mailboxes should be targeted.")) + .body(ARGUMENTS + ".notUpdated[\"" + draftId + "\"].properties", hasSize(1)) + .body(ARGUMENTS + ".notUpdated[\"" + draftId + "\"].properties", contains("mailboxIds")) .body(ARGUMENTS + ".created", aMapWithSize(0)); } @@ -2113,7 +2113,7 @@ public abstract class SetMessagesMethodTest { String messageId = message.getMessageId().serialize(); String moveMessageToOutBox = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId + "\" : {" + " \"mailboxIds\": [\"" + getOutboxId(accessToken) + "\"]" + @@ -2132,10 +2132,10 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(ARGUMENTS + ".notUpdated", hasKey(messageId)) - .body(ARGUMENTS + ".notUpdated[\""+messageId+"\"].type", equalTo("invalidProperties")) - .body(ARGUMENTS + ".notUpdated[\""+messageId+"\"].description", endsWith("Only message with `$Draft` keyword can be moved to Outbox")) - .body(ARGUMENTS + ".notUpdated[\""+messageId+"\"].properties", hasSize(1)) - .body(ARGUMENTS + ".notUpdated[\""+messageId+"\"].properties", contains("mailboxIds")) + .body(ARGUMENTS + ".notUpdated[\"" + messageId + "\"].type", equalTo("invalidProperties")) + .body(ARGUMENTS + ".notUpdated[\"" + messageId + "\"].description", endsWith("Only message with `$Draft` keyword can be moved to Outbox")) + .body(ARGUMENTS + ".notUpdated[\"" + messageId + "\"].properties", hasSize(1)) + .body(ARGUMENTS + ".notUpdated[\"" + messageId + "\"].properties", contains("mailboxIds")) .body(ARGUMENTS + ".created", aMapWithSize(0)); } @@ -2145,7 +2145,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -2182,7 +2182,7 @@ public abstract class SetMessagesMethodTest { String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -2222,7 +2222,7 @@ public abstract class SetMessagesMethodTest { .then() .extract() .body() - .<String>path(ARGUMENTS + ".created."+ messageCreationId +".id"); + .<String>path(ARGUMENTS + ".created." + messageCreationId + ".id"); @@ -2250,7 +2250,7 @@ public abstract class SetMessagesMethodTest { String messageSubject = "Thank you for joining example.com!"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -2287,7 +2287,7 @@ public abstract class SetMessagesMethodTest { .body(SECOND_NAME, equalTo("messages")) .body(SECOND_ARGUMENTS + ".list", hasSize(1)); return true; - } catch(AssertionError e) { + } catch (AssertionError e) { return false; } } @@ -2298,7 +2298,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -2324,8 +2324,8 @@ public abstract class SetMessagesMethodTest { .body(NAME, equalTo("messagesSet")) .body(ARGUMENTS + ".notCreated", hasKey(messageCreationId)) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].type", equalTo("invalidProperties")) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].description", endsWith("no recipient address set")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].type", equalTo("invalidProperties")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].description", endsWith("no recipient address set")) .body(ARGUMENTS + ".created", aMapWithSize(0)); } @@ -2334,7 +2334,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"to\": [{ \"name\": \"BOB\", \"email\": \"[email protected]\"}]," + @@ -2358,10 +2358,10 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(ARGUMENTS + ".notCreated", hasKey(messageCreationId)) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].type", equalTo("invalidProperties")) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].description", endsWith("'from' address is mandatory")) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].properties", hasSize(1)) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].properties", contains("from")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].type", equalTo("invalidProperties")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].description", endsWith("'from' address is mandatory")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].properties", hasSize(1)) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].properties", contains("from")) .body(ARGUMENTS + ".created", aMapWithSize(0)); } @@ -2370,7 +2370,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"[email protected]\"}," + @@ -2405,7 +2405,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"[email protected]\"}," + @@ -2456,7 +2456,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2482,9 +2482,9 @@ public abstract class SetMessagesMethodTest { .body(NAME, equalTo("messagesSet")) .body(ARGUMENTS + ".created", aMapWithSize(1)) .body(ARGUMENTS + ".created", hasKey(messageCreationId)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].headers.From", equalTo(fromAddress)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].from.name", equalTo(fromAddress)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].from.email", equalTo(fromAddress)); + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].headers.From", equalTo(fromAddress)) + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].from.name", equalTo(fromAddress)) + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].from.email", equalTo(fromAddress)); } @Test @@ -2493,7 +2493,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2519,9 +2519,9 @@ public abstract class SetMessagesMethodTest { .body(NAME, equalTo("messagesSet")) .body(ARGUMENTS + ".created", aMapWithSize(1)) .body(ARGUMENTS + ".created", hasKey(messageCreationId)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].headers.From", equalTo(fromAddress)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].from.name", equalTo(fromAddress)) - .body(ARGUMENTS + ".created[\""+messageCreationId+"\"].from.email", equalTo(fromAddress)); + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].headers.From", equalTo(fromAddress)) + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].from.name", equalTo(fromAddress)) + .body(ARGUMENTS + ".created[\"" + messageCreationId + "\"].from.email", equalTo(fromAddress)); } @Test @@ -2532,7 +2532,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2564,7 +2564,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -2596,7 +2596,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"[email protected]\"}," + @@ -2620,10 +2620,10 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(ARGUMENTS + ".notCreated", hasKey(messageCreationId)) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].type", equalTo("invalidProperties")) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].properties", hasSize(1)) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].properties", contains("from")) - .body(ARGUMENTS + ".notCreated[\""+messageCreationId+"\"].description", endsWith("Invalid 'from' field. Must be [email protected]")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].type", equalTo("invalidProperties")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].properties", hasSize(1)) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].properties", contains("from")) + .body(ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"].description", endsWith("Invalid 'from' field. Must be [email protected]")) .body(ARGUMENTS + ".created", aMapWithSize(0)); } @@ -2642,7 +2642,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2684,7 +2684,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2739,7 +2739,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2796,7 +2796,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2868,7 +2868,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2910,7 +2910,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2953,7 +2953,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -2968,7 +2968,7 @@ public abstract class SetMessagesMethodTest { " ]" + "]"; - String notCreatedMessage = ARGUMENTS + ".notCreated[\""+messageCreationId+"\"]"; + String notCreatedMessage = ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"]"; given() .header("Authorization", this.accessToken.serialize()) .body(requestBody) @@ -2996,7 +2996,7 @@ public abstract class SetMessagesMethodTest { .body(SECOND_ARGUMENTS + ".list[0].htmlBody", equalTo("Hello <b>someone</b>, and thank you for joining example.com!")) ; return true; - } catch(AssertionError e) { + } catch (AssertionError e) { return false; } } @@ -3015,7 +3015,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -3056,7 +3056,7 @@ public abstract class SetMessagesMethodTest { .body(SECOND_ARGUMENTS + ".list[0].textBody", equalTo("Hello someone, and thank you for joining example.com, text version!")) ; return true; - } catch(AssertionError e) { + } catch (AssertionError e) { return false; } } @@ -3071,7 +3071,7 @@ public abstract class SetMessagesMethodTest { String mailboxId = message.getMailboxId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + mailboxId + "\"]" + @@ -3103,7 +3103,7 @@ public abstract class SetMessagesMethodTest { String messageToMoveId = message.getMessageId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + heartFolderId + "\"]" + @@ -3147,7 +3147,7 @@ public abstract class SetMessagesMethodTest { String messageToMoveId = message.getMessageId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + heartFolderId + "\"]" + @@ -3190,7 +3190,7 @@ public abstract class SetMessagesMethodTest { String inboxId = message.getMailboxId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + heartFolderId + "\"]" + @@ -3233,7 +3233,7 @@ public abstract class SetMessagesMethodTest { String inboxId = message.getMailboxId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + heartFolderId + "\",\"" + inboxId + "\"]" + @@ -3273,7 +3273,7 @@ public abstract class SetMessagesMethodTest { String mailboxId = message.getMailboxId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + mailboxId + "\"]" + @@ -3318,7 +3318,7 @@ public abstract class SetMessagesMethodTest { String messageToMoveId = message.getMessageId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + mailboxId + "\"]" + @@ -3338,7 +3338,7 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(NOT_UPDATED, hasKey(messageToMoveId)) - .body(NOT_UPDATED + "[\""+messageToMoveId+"\"].type", equalTo("anErrorOccurred")) + .body(NOT_UPDATED + "[\"" + messageToMoveId + "\"].type", equalTo("anErrorOccurred")) .body(ARGUMENTS + ".updated", hasSize(0)); } @@ -3351,7 +3351,7 @@ public abstract class SetMessagesMethodTest { String messageToMoveId = message.getMessageId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": []" + @@ -3371,9 +3371,9 @@ public abstract class SetMessagesMethodTest { .statusCode(200) .body(NAME, equalTo("messagesSet")) .body(NOT_UPDATED, hasKey(messageToMoveId)) - .body(NOT_UPDATED + "[\""+messageToMoveId+"\"].type", equalTo("invalidProperties")) - .body(NOT_UPDATED + "[\""+messageToMoveId+"\"].properties", hasSize(1)) - .body(NOT_UPDATED + "[\""+messageToMoveId+"\"].properties[0]", equalTo("mailboxIds")) + .body(NOT_UPDATED + "[\"" + messageToMoveId + "\"].type", equalTo("invalidProperties")) + .body(NOT_UPDATED + "[\"" + messageToMoveId + "\"].properties", hasSize(1)) + .body(NOT_UPDATED + "[\"" + messageToMoveId + "\"].properties[0]", equalTo("mailboxIds")) .body(ARGUMENTS + ".updated", hasSize(0)); } @@ -3389,7 +3389,7 @@ public abstract class SetMessagesMethodTest { String messageToMoveId = message.getMessageId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + heartFolderId + "\"]," + @@ -3422,7 +3422,7 @@ public abstract class SetMessagesMethodTest { String messageToMoveId = message.getMessageId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + heartFolderId + "\"]," + @@ -3465,7 +3465,7 @@ public abstract class SetMessagesMethodTest { String messageToMoveId = message.getMessageId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + trashId + "\"]" + @@ -3502,7 +3502,7 @@ public abstract class SetMessagesMethodTest { String mailboxId = message.getMailboxId().serialize(); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageToMoveId + "\" : {" + " \"mailboxIds\": [\"" + trashId + "\",\"" + mailboxId + "\"]" + @@ -3539,7 +3539,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -3557,7 +3557,7 @@ public abstract class SetMessagesMethodTest { " ]" + "]"; - String notCreatedPath = ARGUMENTS + ".notCreated[\""+messageCreationId+"\"]"; + String notCreatedPath = ARGUMENTS + ".notCreated[\"" + messageCreationId + "\"]"; given() .header("Authorization", accessToken.serialize()) @@ -3592,7 +3592,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -3616,7 +3616,7 @@ public abstract class SetMessagesMethodTest { " ]" + "]"; - String createdPath = ARGUMENTS + ".created[\""+messageCreationId+"\"]"; + String createdPath = ARGUMENTS + ".created[\"" + messageCreationId + "\"]"; String firstAttachment = createdPath + ".attachments[0]"; String secondAttachment = createdPath + ".attachments[1]"; @@ -3666,11 +3666,11 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\":" + " {" + - " \"" + messageCreationId + "\" : "+ + " \"" + messageCreationId + "\" : " + " {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + " \"to\": [{ \"name\": \"BOB\", \"email\": \"[email protected]\"}]," + @@ -3708,7 +3708,7 @@ public abstract class SetMessagesMethodTest { " ]" + "]"; - String createdPath = ARGUMENTS + ".created[\""+messageCreationId+"\"]"; + String createdPath = ARGUMENTS + ".created[\"" + messageCreationId + "\"]"; String firstAttachment = createdPath + ".attachments[0]"; String secondAttachment = createdPath + ".attachments[1]"; String thirdAttachment = createdPath + ".attachments[2]"; @@ -3754,11 +3754,11 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\":" + " {" + - " \"" + messageCreationId + "\" : "+ + " \"" + messageCreationId + "\" : " + " {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + " \"to\": [{ \"name\": \"BOB\", \"email\": \"" + fromAddress + "\"}]," + @@ -3872,7 +3872,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -3943,7 +3943,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4035,7 +4035,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4109,7 +4109,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4179,7 +4179,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4246,7 +4246,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4283,7 +4283,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4340,7 +4340,7 @@ public abstract class SetMessagesMethodTest { .body(SECOND_NAME, equalTo("messages")) .body(SECOND_ARGUMENTS + ".list[0]", hasEntry(equalTo("headers"), allHeadersMatcher(expectedHeaders))); return true; - } catch(AssertionError e) { + } catch (AssertionError e) { e.printStackTrace(); return false; } @@ -4358,7 +4358,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + USERNAME + "\"}," + @@ -4381,7 +4381,7 @@ public abstract class SetMessagesMethodTest { .then() .extract() .body() - .<String>path(ARGUMENTS + ".created."+ messageCreationId +".id"); + .<String>path(ARGUMENTS + ".created." + messageCreationId + ".id"); calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInInbox(accessToken)); @@ -4413,7 +4413,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4458,7 +4458,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + USERNAME + "\"}," + @@ -4481,7 +4481,7 @@ public abstract class SetMessagesMethodTest { .then() .extract() .body() - .<String>path(ARGUMENTS + ".created."+ messageCreationId +".id"); + .<String>path(ARGUMENTS + ".created." + messageCreationId + ".id"); calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInInbox(accessToken)); @@ -4505,7 +4505,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + USERNAME + "\"}," + @@ -4542,7 +4542,7 @@ public abstract class SetMessagesMethodTest { String messageCreationId = "creationId1337"; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + USERNAME + "\"}," + @@ -4565,7 +4565,7 @@ public abstract class SetMessagesMethodTest { .then() .extract() .body() - .<String>path(ARGUMENTS + ".created."+ messageCreationId +".id"); + .<String>path(ARGUMENTS + ".created." + messageCreationId + ".id"); calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInInbox(accessToken)); @@ -4601,7 +4601,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4621,7 +4621,7 @@ public abstract class SetMessagesMethodTest { " ]" + "]"; - String createdPath = ARGUMENTS + ".created[\""+messageCreationId+"\"]"; + String createdPath = ARGUMENTS + ".created[\"" + messageCreationId + "\"]"; String singleAttachment = createdPath + ".attachments[0]"; given() @@ -4653,7 +4653,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4681,7 +4681,7 @@ public abstract class SetMessagesMethodTest { .then() .extract() .body() - .<String>path(ARGUMENTS + ".created."+ messageCreationId +".id"); + .<String>path(ARGUMENTS + ".created." + messageCreationId + ".id"); calmlyAwait.atMost(30, TimeUnit.SECONDS).until(() -> isAnyMessageFoundInInbox(accessToken)); @@ -4714,7 +4714,7 @@ public abstract class SetMessagesMethodTest { String inboxId = getMailboxId(accessToken, Role.INBOX); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4774,7 +4774,7 @@ public abstract class SetMessagesMethodTest { String outboxId = getOutboxId(accessToken); String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4797,7 +4797,7 @@ public abstract class SetMessagesMethodTest { " ]" + "]"; - String createdPath = ARGUMENTS + ".created[\""+messageCreationId+"\"]"; + String createdPath = ARGUMENTS + ".created[\"" + messageCreationId + "\"]"; String firstAttachment = createdPath + ".attachments[0]"; String secondAttachment = createdPath + ".attachments[1]"; @@ -4851,7 +4851,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4884,7 +4884,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -4972,7 +4972,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"email\": \"" + fromAddress + "\"}," + @@ -5015,7 +5015,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -5041,7 +5041,7 @@ public abstract class SetMessagesMethodTest { .then() .extract() .body() - .<String>path(ARGUMENTS + ".created."+ messageCreationId +".id"); + .<String>path(ARGUMENTS + ".created." + messageCreationId + ".id"); with() .header("Authorization", accessToken.serialize()) @@ -5064,7 +5064,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -5087,11 +5087,11 @@ public abstract class SetMessagesMethodTest { .then() .extract() .body() - .<String>path(ARGUMENTS + ".created."+ messageCreationId +".id"); + .<String>path(ARGUMENTS + ".created." + messageCreationId + ".id"); String updateRequestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId + "\" : {" + " \"isUnread\": true," + @@ -5131,7 +5131,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -5161,7 +5161,7 @@ public abstract class SetMessagesMethodTest { String updateRequestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId + "\" : {" + " \"isUnread\": false," + @@ -5201,7 +5201,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -5231,7 +5231,7 @@ public abstract class SetMessagesMethodTest { String updateRequestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId + "\" : {" + " \"isUnread\": false," + @@ -5263,7 +5263,7 @@ public abstract class SetMessagesMethodTest { String fromAddress = USERNAME; String requestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + messageCreationId + "\" : {" + " \"from\": { \"name\": \"Me\", \"email\": \"" + fromAddress + "\"}," + @@ -5293,7 +5293,7 @@ public abstract class SetMessagesMethodTest { String updateRequestBody = "[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId + "\" : {" + " \"isUnread\": false," +
http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java index b6d75ec..79c102e 100644 --- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java +++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/MainStepdefs.java @@ -52,7 +52,7 @@ public class MainStepdefs { public MailboxProbe mailboxProbe; public ACLProbe aclProbe; public MessageIdProbe messageIdProbe; - public Runnable awaitMethod = () -> {}; + public Runnable awaitMethod = () -> { }; public MessageId.Factory messageIdFactory; public void init() throws Exception { http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java index f00dd6d..a11da56 100644 --- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java +++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMailboxesMethodStepdefs.java @@ -231,7 +231,7 @@ public class SetMailboxesMethodStepdefs { @When("^\"([^\"]*)\" deletes the mailbox \"([^\"]*)\" owned by \"([^\"]*)\"$") public void deletesMailbox(String user, String mailboxName, String owner) throws Throwable { - String mailboxId = mainStepdefs.getMailboxId( owner, mailboxName).serialize(); + String mailboxId = mainStepdefs.getMailboxId(owner, mailboxName).serialize(); userStepdefs.connectUser(user); String requestBody = "[" + http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMessagesMethodStepdefs.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMessagesMethodStepdefs.java b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMessagesMethodStepdefs.java index be925cb..cc4159a 100644 --- a/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMessagesMethodStepdefs.java +++ b/server/protocols/jmap-integration-testing/jmap-integration-testing-common/src/test/java/org/apache/james/jmap/methods/integration/cucumber/SetMessagesMethodStepdefs.java @@ -68,7 +68,7 @@ public class SetMessagesMethodStepdefs { httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId.serialize() + "\" : {" + " \"mailboxIds\": [\"" + mailboxId.serialize() + "\"]" + @@ -88,7 +88,7 @@ public class SetMessagesMethodStepdefs { httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId.serialize() + "\" : {" + " \"mailboxIds\": [\"" + mailboxId.serialize() + "\"]," + @@ -115,7 +115,7 @@ public class SetMessagesMethodStepdefs { httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId.serialize() + "\" : {" + " \"mailboxIds\": [\"" + destinationMailboxId.serialize() + "\",\"" + sourceMailboxId.serialize() + "\"]" + @@ -139,7 +139,7 @@ public class SetMessagesMethodStepdefs { httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId.serialize() + "\" : {" + " \"mailboxIds\": [\"" + destinationMailboxId.serialize() + "\",\"" + sourceMailboxId.serialize() + "\"]" + @@ -162,7 +162,7 @@ public class SetMessagesMethodStepdefs { httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId.serialize() + "\" : {" + " \"mailboxIds\": [\"" + destinationMailboxId.serialize() + "\"]" + @@ -186,7 +186,7 @@ public class SetMessagesMethodStepdefs { httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId.serialize() + "\" : {" + " \"isFlagged\": true" + @@ -226,7 +226,7 @@ public class SetMessagesMethodStepdefs { userStepdefs.execWithUser(username, () -> { httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"destroy\": [ \"" + messageId.serialize() + "\" ]" + " }," + @@ -243,7 +243,7 @@ public class SetMessagesMethodStepdefs { String mailboxId = mainStepdefs.getMailboxId(username, mailboxName).serialize(); httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"create\": { \"" + message + "\" : {" + " \"subject\": \"subject\"," + @@ -271,7 +271,7 @@ public class SetMessagesMethodStepdefs { httpClient.post("[" + " [" + - " \"setMessages\","+ + " \"setMessages\"," + " {" + " \"update\": { \"" + messageId.serialize() + "\" : {" + " \"keywords\": {" + keywordString + "}" + http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryDownloadCucumberTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryDownloadCucumberTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryDownloadCucumberTest.java index 3580c53..9fc8a9e 100644 --- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryDownloadCucumberTest.java +++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryDownloadCucumberTest.java @@ -25,8 +25,8 @@ import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) -@CucumberOptions(features={"classpath:cucumber/DownloadEndpoint.feature", "classpath:cucumber/DownloadGet.feature", "classpath:cucumber/DownloadPost.feature"}, - glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, +@CucumberOptions(features = {"classpath:cucumber/DownloadEndpoint.feature", "classpath:cucumber/DownloadGet.feature", "classpath:cucumber/DownloadPost.feature"}, + glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, tags = {"~@Ignore"}, strict = true) public class MemoryDownloadCucumberTest { http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryGetMessagesMethodTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryGetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryGetMessagesMethodTest.java index ae261a6..decbc25 100644 --- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryGetMessagesMethodTest.java +++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryGetMessagesMethodTest.java @@ -25,8 +25,8 @@ import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) -@CucumberOptions(features="classpath:cucumber/GetMessages.feature", - glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, +@CucumberOptions(features = "classpath:cucumber/GetMessages.feature", + glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, strict = true) public class MemoryGetMessagesMethodTest { } http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPKeywordsInconsistenciesTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPKeywordsInconsistenciesTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPKeywordsInconsistenciesTest.java index 30bbe9e..877a3a6 100644 --- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPKeywordsInconsistenciesTest.java +++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPKeywordsInconsistenciesTest.java @@ -25,8 +25,8 @@ import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) -@CucumberOptions(features="classpath:cucumber/ImapKeywordsConsistency.feature", - glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, +@CucumberOptions(features = "classpath:cucumber/ImapKeywordsConsistency.feature", + glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, strict = true) public class MemoryIMAPKeywordsInconsistenciesTest { } http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPSetMessagesCompatibilityTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPSetMessagesCompatibilityTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPSetMessagesCompatibilityTest.java index 2f929bf..1d1cac6 100644 --- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPSetMessagesCompatibilityTest.java +++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryIMAPSetMessagesCompatibilityTest.java @@ -25,8 +25,8 @@ import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) -@CucumberOptions(features="classpath:cucumber/ImapSetMessagesMailboxesUpdatesCompatibility.feature", - glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, +@CucumberOptions(features = "classpath:cucumber/ImapSetMessagesMailboxesUpdatesCompatibility.feature", + glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, strict = true) public class MemoryIMAPSetMessagesCompatibilityTest { } http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMailboxesMethodCucumberTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMailboxesMethodCucumberTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMailboxesMethodCucumberTest.java index e0cbec0..49e81f4 100644 --- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMailboxesMethodCucumberTest.java +++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMailboxesMethodCucumberTest.java @@ -25,8 +25,8 @@ import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) -@CucumberOptions(features= { "classpath:cucumber/MailboxModification.feature", "classpath:cucumber/SetMailboxes.feature" }, - glue= { "org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber" }, +@CucumberOptions(features = { "classpath:cucumber/MailboxModification.feature", "classpath:cucumber/SetMailboxes.feature" }, + glue = { "org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber" }, strict = true) public class MemorySetMailboxesMethodCucumberTest { } http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMessagesMethodCucumberTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMessagesMethodCucumberTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMessagesMethodCucumberTest.java index 164e2fb..287ce0f 100644 --- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMessagesMethodCucumberTest.java +++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySetMessagesMethodCucumberTest.java @@ -25,8 +25,8 @@ import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) -@CucumberOptions(features="classpath:cucumber/SetMessages.feature", - glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, +@CucumberOptions(features = "classpath:cucumber/SetMessages.feature", + glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, strict = true) public class MemorySetMessagesMethodCucumberTest { } http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySharingTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySharingTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySharingTest.java index cd54d34..767a26a 100644 --- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySharingTest.java +++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemorySharingTest.java @@ -24,7 +24,7 @@ import cucumber.api.junit.Cucumber; import org.junit.runner.RunWith; @RunWith(Cucumber.class) -@CucumberOptions(features= { +@CucumberOptions(features = { "classpath:cucumber/sharing/SharingParentMailboxWithAndWithoutChildren.feature", "classpath:cucumber/sharing/SharingChildrenWithoutSharingParent.feature", "classpath:cucumber/sharing/GetMessageAndSharing.feature", @@ -40,7 +40,7 @@ import org.junit.runner.RunWith; "classpath:cucumber/sharing/SetFlagAndSharing.feature", "classpath:cucumber/sharing/RenamingMailboxAndSharing.feature", "classpath:cucumber/sharing/CopyAndSharing.feature" }, - glue= { "org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber" }, + glue = { "org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber" }, tags = {"~@Ignore"}, strict = true) public class MemorySharingTest { http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryUploadCucumberTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryUploadCucumberTest.java b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryUploadCucumberTest.java index 25b123e..c1bea79 100644 --- a/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryUploadCucumberTest.java +++ b/server/protocols/jmap-integration-testing/memory-jmap-integration-testing/src/test/java/org/apache/james/jmap/memory/cucumber/MemoryUploadCucumberTest.java @@ -25,8 +25,8 @@ import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) -@CucumberOptions(features={"classpath:cucumber/UploadEndpoint.feature"}, - glue={"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, +@CucumberOptions(features = {"classpath:cucumber/UploadEndpoint.feature"}, + glue = {"org.apache.james.jmap.methods.integration", "org.apache.james.jmap.memory.cucumber"}, tags = {"~@Ignore"}, strict = true) public class MemoryUploadCucumberTest { http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java index c00c1f4..49688b1 100644 --- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java +++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/MIMEMessageConverter.java @@ -227,8 +227,7 @@ public class MIMEMessageConverter { if (newMessage.getHtmlBody().isPresent() && newMessage.getTextBody().isPresent()) { Multipart body = createMultipartAlternativeBody(newMessage); builder.addBodyPart(BodyPartBuilder.create().setBody(body).build()); - } - else { + } else { addText(builder, newMessage.getTextBody()); addHtml(builder, newMessage.getHtmlBody()); } http://git-wip-us.apache.org/repos/asf/james-project/blob/fe712f1a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMailboxesUpdateProcessor.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMailboxesUpdateProcessor.java b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMailboxesUpdateProcessor.java index 06fc046..912765f 100644 --- a/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMailboxesUpdateProcessor.java +++ b/server/protocols/jmap/src/main/java/org/apache/james/jmap/methods/SetMailboxesUpdateProcessor.java @@ -158,7 +158,7 @@ public class SetMailboxesUpdateProcessor implements SetMailboxesProcessor { } catch (MailboxException e) { LOGGER.error("Error while updating mailbox", e); responseBuilder.notUpdated(mailboxId, SetError.builder() - .type( "anErrorOccurred") + .type("anErrorOccurred") .description("An error occurred when updating the mailbox") .build()); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
