Skip to content

Commit

Permalink
updating testUpdateRequest() in UpdateRequestIntegrationTest class
Browse files Browse the repository at this point in the history
  • Loading branch information
azakrzewski-hy committed Dec 19, 2024
1 parent 576e8eb commit 83abcfa
Showing 1 changed file with 4 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,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")
public class UpdateRequestIntegrationTest extends E2ETestBase
Expand Down Expand Up @@ -102,56 +104,8 @@ void testUpdateRequest()
containerSupport.raiseRepoEvent(repoEvent);

// then
String expectedBody = """
[
{
"objectId": "d71dd823-82c7-477c-8490-04cb0e826e65",
"sourceId" : "alfresco-dummy-source-id-0a63de491876",
"eventType": "update",
"sourceTimestamp" : 1611656982995,
"properties": {
"cm:title": {"value": "Purchase Order"},
"aspectsNames": {"value": ["cm:versionable", "cm:author", "cm:titled"]},
"modifiedBy": {"value": "abeecher"},
"createdAt" : {
"value" : 1611227655695
},
"modifiedAt" : {
"value" : 1611227655695
},
"cm:versionLabel" : {
"value" : "1.0"
},
"createdBy" : {
"value" : "admin"
},
"ALLOW_ACCESS" : {
"value" : [ "GROUP_EVERYONE" ]
},
"cm:name" : {
"value" : "purchase-order-scan.pdf",
"annotation" : "name"
},
"type" : {
"value" : "cm:content"
},
"DENY_ACCESS" : {
"value" : [ ]
},
"cm:content" : {
"file" : {
"content-metadata" : {
"size" : 531152,
"name" : "purchase-order-scan.pdf",
"content-type" : "application/pdf"
}
}
}
},
"removedProperties": ["cm:versionType", "cm:description"]
}
]""";
containerSupport.expectHxIngestMessageReceived(expectedBody);
HxInsightRequest request = RequestLoader.load("/expected-hxinsight-requests/update-document-request.yml");
containerSupport.expectHxIngestMessageReceived(request.body());
}

@Test
Expand Down

0 comments on commit 83abcfa

Please sign in to comment.