From 7ca41df7e1161b67a2e313d6588efa8515c4694c Mon Sep 17 00:00:00 2001 From: phmai Date: Fri, 17 Nov 2023 09:21:56 +0100 Subject: [PATCH] read json string directly from file --- .../com/here/naksha/app/service/CreateFeatureTestHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/here-naksha-app-service/src/test/java/com/here/naksha/app/service/CreateFeatureTestHelper.java b/here-naksha-app-service/src/test/java/com/here/naksha/app/service/CreateFeatureTestHelper.java index 4d5e670d7..c0d80eace 100644 --- a/here-naksha-app-service/src/test/java/com/here/naksha/app/service/CreateFeatureTestHelper.java +++ b/here-naksha-app-service/src/test/java/com/here/naksha/app/service/CreateFeatureTestHelper.java @@ -136,9 +136,10 @@ public void tc0300_testCreateFeaturesWithNewIds() throws Exception { // Given: Space (uses above EventHandler) configured in Admin storage final Space space = parseJsonFileOrFail("TC0300_createFeaturesWithNewIds/create_space.json", Space.class); + final String spaceJsonString = loadFileOrFail("TC0300_createFeaturesWithNewIds/create_space.json"); request = HttpRequest.newBuilder(stdHttpRequest, (k, v) -> true) .uri(new URI(nakshaHttpUri + "hub/spaces")) - .POST(HttpRequest.BodyPublishers.ofString(space.toString())) + .POST(HttpRequest.BodyPublishers.ofString(spaceJsonString)) .header(HDR_STREAM_ID, streamId) .build(); response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());