You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2020/08/27 02:24:42 UTC
[james-project] 10/14: JAMES-3359 Review MailboxSetMethodContract
indent
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 c1d704bb5fc4850f85754834d85152b1a49baeeb
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Aug 24 10:00:43 2020 +0700
JAMES-3359 Review MailboxSetMethodContract indent
---
.../contract/MailboxSetMethodContract.scala | 306 ++++++++++-----------
1 file changed, 153 insertions(+), 153 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 9a06964..28f447e 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
@@ -1632,18 +1632,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -1689,18 +1689,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -1745,18 +1745,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -1807,18 +1807,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -1861,18 +1861,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -1909,15 +1909,15 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
+ `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
val response = `given`
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
@@ -1985,15 +1985,15 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
+ `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
val response = `given`
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
@@ -2061,18 +2061,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -2122,18 +2122,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -2176,18 +2176,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -2232,18 +2232,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -2283,18 +2283,18 @@ trait MailboxSetMethodContract {
|}
|""".stripMargin
- val response = `given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .log().ifValidationFails()
- .statusCode(SC_OK)
- .contentType(JSON)
- .extract
- .body
- .asString
+ val response = `given`
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .log().ifValidationFails()
+ .statusCode(SC_OK)
+ .contentType(JSON)
+ .extract
+ .body
+ .asString
assertThatJson(response).isEqualTo(
s"""{
@@ -2343,17 +2343,17 @@ trait MailboxSetMethodContract {
|""".stripMargin
`given`
- .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
- .body(request)
- .when
- .post
- .`then`
- .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))
+ .header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
+ .body(request)
+ .when
+ .post
+ .`then`
+ .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))
}
@Test
@@ -4746,9 +4746,9 @@ trait MailboxSetMethodContract {
val response = `given`
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
.body(request)
- .when
+ .when
.post
- .`then`
+ .`then`
.log().ifValidationFails()
.statusCode(SC_OK)
.contentType(JSON)
@@ -4826,9 +4826,9 @@ trait MailboxSetMethodContract {
val response = `given`
.header(ACCEPT.toString, ACCEPT_RFC8621_VERSION_HEADER)
.body(request)
- .when
+ .when
.post
- .`then`
+ .`then`
.log().ifValidationFails()
.statusCode(SC_OK)
.contentType(JSON)
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org