From fe8eed981054c5a8b937cfb8b6de97a83f50f8d4 Mon Sep 17 00:00:00 2001 From: Besmir Beqiri Date: Mon, 30 Sep 2024 15:38:38 +0200 Subject: [PATCH] Replace string concatenation with text blocks in AuthenticationServer tests --- .../core/http/AuthenticationServerTests.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/jpro-auth/core/src/test/java/one/jpro/platform/auth/core/http/AuthenticationServerTests.java b/jpro-auth/core/src/test/java/one/jpro/platform/auth/core/http/AuthenticationServerTests.java index 008f0574..daf313a3 100644 --- a/jpro-auth/core/src/test/java/one/jpro/platform/auth/core/http/AuthenticationServerTests.java +++ b/jpro-auth/core/src/test/java/one/jpro/platform/auth/core/http/AuthenticationServerTests.java @@ -33,19 +33,20 @@ public void testHttpServer() throws IOException, InterruptedException { assertEquals(HttpStatus.OK, HttpStatus.fromCode(httpResponse.statusCode())); assertEquals(HttpMethod.GET, HttpMethod.valueOf(request.method())); assertEquals(URI.create("http://localhost:8080/auth?foo&bar=HTTP/1.1"), request.uri()); - assertEquals("\n" + - "\n" + - "\n" + - " \n" + - " Authentication\n" + - "\n" + - "\n" + - "
\n" + - "

Authentication Successful

\n" + - " Please close the page.\n" + - "
\n" + - "\n" + - "", httpResponse.body()); + assertEquals(""" + + + + + Authentication + + +
+

Authentication Successful

+ Please close the page. +
+ + """, httpResponse.body()); assertEquals("{ {content-length=[350], content-type=[text/html]} }", "{ " + httpResponse.headers().map() + " }"); assertEquals("localhost", httpServer.getServerHost());