From eba9e9aed7e57ae0270fc6f7f3fe7745d8d25e6d Mon Sep 17 00:00:00 2001 From: asia Date: Tue, 8 Feb 2022 20:26:02 +0100 Subject: [PATCH] Remove unnecessary line breaks. --- .../baeldung/sprq/GraphqlControllerIntegrationTest.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spring-boot-modules/spring-boot-libraries-2/src/test/java/com/baeldung/sprq/GraphqlControllerIntegrationTest.java b/spring-boot-modules/spring-boot-libraries-2/src/test/java/com/baeldung/sprq/GraphqlControllerIntegrationTest.java index 65b6ff1e0b..b1054f09f8 100644 --- a/spring-boot-modules/spring-boot-libraries-2/src/test/java/com/baeldung/sprq/GraphqlControllerIntegrationTest.java +++ b/spring-boot-modules/spring-boot-libraries-2/src/test/java/com/baeldung/sprq/GraphqlControllerIntegrationTest.java @@ -31,10 +31,11 @@ public class GraphqlControllerIntegrationTest { @Test public void givenNoBooks_whenReadAll_thenStatusIsOk() throws Exception { - String getAllBooksQuery = "{\n" + " getAllBooks {\n" + " id\n" + " author\n" + " title\n" + " }\n" + "}\n"; + String getAllBooksQuery = "{ getAllBooks {id author title } }"; this.mockMvc.perform(post(GRAPHQL_PATH).content(toJSON(getAllBooksQuery)) - .contentType(MediaType.APPLICATION_JSON)) + .contentType( + MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$.getAllBooks").isEmpty()); } @@ -42,7 +43,8 @@ public class GraphqlControllerIntegrationTest { @Test public void whenAddBook_thenStatusIsOk() throws Exception { - String addBookMutation = "mutation {\n" + " addBook(newBook: {id: 123, author: \"J.R.R. Tolkien\", title: \"The Lord of the Rings\"}) {\n" + " id\n" + " author\n" + " title\n" + " }\n" + "}\n"; + String addBookMutation = "mutation { addBook(newBook: {id: 123, author: \"J.R.R. Tolkien\", " + + "title: \"The Lord of the Rings\"}) { id author title } }"; this.mockMvc.perform(post(GRAPHQL_PATH).content(toJSON(addBookMutation)) .contentType(MediaType.APPLICATION_JSON))