From 576e8eb05c87851c63d7f49f9ac3c34b89ea9810 Mon Sep 17 00:00:00 2001 From: "adam.zakrzewski" Date: Thu, 19 Dec 2024 14:26:59 +0100 Subject: [PATCH] updating DeleteRequestIntegrationTest class --- .../e2e/repository/DeleteRequestIntegrationTest.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/live-ingester/src/integration-test/java/org/alfresco/hxi_connector/live_ingester/domain/usecase/e2e/repository/DeleteRequestIntegrationTest.java b/live-ingester/src/integration-test/java/org/alfresco/hxi_connector/live_ingester/domain/usecase/e2e/repository/DeleteRequestIntegrationTest.java index 0f72cd973..491fa90e9 100644 --- a/live-ingester/src/integration-test/java/org/alfresco/hxi_connector/live_ingester/domain/usecase/e2e/repository/DeleteRequestIntegrationTest.java +++ b/live-ingester/src/integration-test/java/org/alfresco/hxi_connector/live_ingester/domain/usecase/e2e/repository/DeleteRequestIntegrationTest.java @@ -28,6 +28,8 @@ import org.junit.jupiter.api.Test; import org.alfresco.hxi_connector.live_ingester.util.E2ETestBase; +import org.alfresco.hxi_connector.live_ingester.util.insight_api.HxInsightRequest; +import org.alfresco.hxi_connector.live_ingester.util.insight_api.RequestLoader; @SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert") class DeleteRequestIntegrationTest extends E2ETestBase @@ -59,13 +61,7 @@ void testDeleteRequest() containerSupport.raiseRepoEvent(repoEvent); // then - String expectedBody = """ - { - "objectId": "d71dd823-82c7-477c-8490-04cb0e826e65", - "sourceId" : "alfresco-dummy-source-id-0a63de491876", - "eventType": "delete", - "sourceTimestamp": 1611656982995 - }"""; - containerSupport.expectHxIngestMessageReceived(expectedBody); + HxInsightRequest request = RequestLoader.load("/expected-hxinsight-requests/delete-document-request.yml"); + containerSupport.expectHxIngestMessageReceived(request.body()); } }