Skip to content

Commit

Permalink
Solve sonar issues related to string blocks (#7711)
Browse files Browse the repository at this point in the history
Signed-off-by: vlo-rte <[email protected]>
  • Loading branch information
vlo-rte committed Dec 24, 2024
1 parent 4b75c74 commit e536b22
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 204 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,20 @@ void fetchCssResource() throws Exception {
result
.andExpect(status().isOk())
.andExpect(content().contentType("text/css"))
.andExpect(content().string(is(".bold {\n" +
" font-weight: bold;\n" +
"}")));
.andExpect(content().string(is("""
.bold {
font-weight: bold;
}""")));
result = mockMvc.perform(
get("/processes/first/css/style1?version=0.1")
.accept("text/css"));
result
.andExpect(status().isOk())
.andExpect(content().contentType("text/css"))
.andExpect(content().string(is(".bold {\n" +
" font-weight: bolder;\n" +
"}")));
.andExpect(content().string(is("""
.bold {
font-weight: bolder;
}""")));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,21 @@ void fetchCssResource() throws Exception {
result
.andExpect(status().isOk())
.andExpect(content().contentType("text/css"))
.andExpect(content().string(is(".bold {\n" +
" font-weight: bold;\n" +
"}")))
.andExpect(content().string(is("""
.bold {
font-weight: bold;
}""")))
;
result = mockMvc.perform(
get("/processes/first/css/style1?version=0.1")
.accept("text/css"));
result
.andExpect(status().isOk())
.andExpect(content().contentType("text/css"))
.andExpect(content().string(is(".bold {\n" +
" font-weight: bolder;\n" +
"}")))
.andExpect(content().string(is("""
.bold {
font-weight: bolder;
}""")))
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,25 +107,28 @@ void fetchCss() throws IOException {
.exists()
.isFile()
.hasName("style1.css")
.hasContent(".bold {\n" +
" font-weight: bold;\n" +
"}");
.hasContent("""
.bold {
font-weight: bold;
}""");
styleFile = service.fetchResource("first", CSS, "0.1", "style1").getFile();
assertThat(styleFile)
.exists()
.isFile()
.hasName("style1.css")
.hasContent(".bold {\n" +
" font-weight: bolder;\n" +
"}");
.hasContent("""
.bold {
font-weight: bolder;
}""");
styleFile = service.fetchResource("first", CSS, "0.1", "style1").getFile();
assertThat(styleFile)
.exists()
.isFile()
.hasName("style1.css")
.hasContent(".bold {\n" +
" font-weight: bolder;\n" +
"}");
.hasContent("""
.bold {
font-weight: bolder;
}""");
}

@Test
Expand Down
Loading

0 comments on commit e536b22

Please sign in to comment.