This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 8852e1d0e7805e76fde80be3cfa68304ac50eb17 Author: Benoit Tellier <[email protected]> AuthorDate: Wed Aug 19 09:20:32 2020 +0700 JAMES-3356 Fix cosmetic issues in MailboxSetMethodContract --- .../contract/MailboxSetMethodContract.scala | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/MailboxSetMethodContract.scala b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/MailboxSetMethodContract.scala index 21e234e..ac8b4a6 100644 --- a/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/MailboxSetMethodContract.scala +++ b/server/protocols/jmap-rfc-8621-integration-tests/jmap-rfc-8621-integration-tests-common/src/main/scala/org/apache/james/jmap/rfc8621/contract/MailboxSetMethodContract.scala @@ -59,7 +59,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldReturnNotCreatedWhenNameIsMissing(): Unit = { - val request= + val request = """ |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -115,7 +115,7 @@ trait MailboxSetMethodContract { @Test @Disabled("should we support that? Anyway seems hard with Play-JSON") def mailboxSetShouldReturnNotCreatedWhenUnknownParameter(): Unit = { - val request= + val request = """ |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -172,7 +172,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldReturnNotCreatedWhenBadParameter(): Unit = { - val request= + val request = """ |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -229,7 +229,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldCreateMailboxWhenOnlyName(server: GuiceJamesServer): Unit = { - val request= + val request = """ |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -269,7 +269,7 @@ trait MailboxSetMethodContract { @Test def mailboxGetShouldAllowTheUseOfCreationIds(server: GuiceJamesServer): Unit = { - val request= + val request = """ |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -374,7 +374,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldReturnCreatedWhenOnlyName(server: GuiceJamesServer): Unit = { - val request= + val request = """ |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -439,7 +439,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldReturnCreatedAndNotCreatedWhenOneWithOnlyNameAndOneWithoutName(server: GuiceJamesServer): Unit = { - val request= + val request = """ |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -513,7 +513,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldCreateMailboxWhenNameAndParentId(server: GuiceJamesServer): Unit = { val mailboxId: MailboxId = server.getProbe(classOf[MailboxProbeImpl]).createMailbox(MailboxPath.forUser(BOB, "parentMailbox")) - val request= + val request = s""" |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -552,7 +552,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldNotCreateMailboxWhenParentIdNotFound(): Unit = { val mailboxId: MailboxId = randomMailboxId - val request= + val request = s""" |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -610,7 +610,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldNotCreateMailboxWhenNameExists(server: GuiceJamesServer): Unit = { server.getProbe(classOf[MailboxProbeImpl]).createMailbox(MailboxPath.forUser(BOB, "mailbox")) - val request= + val request = s""" |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -666,7 +666,7 @@ trait MailboxSetMethodContract { @Test def mailboxSetShouldNotCreateMailboxWhenNameTooLong(): Unit = { - val request= + val request = s""" |{ | "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ], @@ -1294,9 +1294,9 @@ trait MailboxSetMethodContract { .log().ifValidationFails() .statusCode(SC_OK) .contentType(JSON) - // We need to limit ourself to simple body assertions in order not to infer id allocation - .body("methodResponses[0][1].created.C42.totalThreads", equalTo(0)) - .body("methodResponses[1][1].destroyed", hasSize(1)) + // We need to limit ourself to simple body assertions in order not to infer id allocation + .body("methodResponses[0][1].created.C42.totalThreads", equalTo(0)) + .body("methodResponses[1][1].destroyed", hasSize(1)) } @Test --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
