From 2304e822ef151ed7280ef02638a17a43739c4ca0 Mon Sep 17 00:00:00 2001 From: SrdjanStevanetic Date: Tue, 17 Dec 2024 13:22:18 +0100 Subject: [PATCH] zoho aggregator new fields added to integration tests --- .../testutils/ZohoRecordTestDeserializer.java | 8 +++++++ .../web/EntityRegistrationIT.java | 6 +++++ .../aggregator_zoho_euskariana_response.json | 24 ++++++++++++++----- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/testutils/ZohoRecordTestDeserializer.java b/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/testutils/ZohoRecordTestDeserializer.java index 6546a987..6cc63bae 100644 --- a/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/testutils/ZohoRecordTestDeserializer.java +++ b/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/testutils/ZohoRecordTestDeserializer.java @@ -6,10 +6,13 @@ import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.AGGREGATING_FROM; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.AGGREGATORS; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.ALTERNATIVE_FIELD; +import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.AUDIENCE_ENGAGEMENT_ACTIVITY; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.CAPACITY_BUILDING; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.CITY_FIELD; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.COUNTRY_FIELD; +import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.DATA_ACTIVITY; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.EUROPEANA_ID_FIELD; +import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.GEOGRAPHIC_SCOPE; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.HERITAGE_DOMAIN; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.HIDDEN_LABEL1_FIELD; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.HIDDEN_LABEL2_FIELD; @@ -26,6 +29,7 @@ import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.LATITUDE_FIELD; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.LOGO_LINK_TO_WIKIMEDIACOMMONS_FIELD; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.LONGITUDE_FIELD; +import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.MEDIA_TYPE; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.NAME_FIELD; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.OFFICIAL_LANGUAGE_FIELD; import static eu.europeana.entitymanagement.zoho.utils.ZohoConstants.ORGANIZATION_ROLE_FIELD; @@ -84,6 +88,10 @@ public class ZohoRecordTestDeserializer extends StdDeserializer { INDUSTRY_FIELD, HERITAGE_DOMAIN, PUBLIC_EMAIL, + GEOGRAPHIC_SCOPE, + MEDIA_TYPE, + DATA_ACTIVITY, + AUDIENCE_ENGAGEMENT_ACTIVITY, CAPACITY_BUILDING, AGGREGATORS, EUROPEANA_ID_FIELD, diff --git a/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/web/EntityRegistrationIT.java b/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/web/EntityRegistrationIT.java index f0c62245..96dd2e59 100644 --- a/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/web/EntityRegistrationIT.java +++ b/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/web/EntityRegistrationIT.java @@ -306,7 +306,13 @@ public void zohoCheckAggregatedViaOverZohoOrgSearch() throws Exception { .andExpect(jsonPath("$.isAggregatedBy.aggregates", hasSize(2))) //1. from the response, 2. the zoho id, 3. the aggregator id .andExpect(jsonPath("$.sameAs", hasSize(3))) + .andExpect(jsonPath("$.mbox").isNotEmpty()) + .andExpect(jsonPath("$.geographicScope").isNotEmpty()) .andExpect(jsonPath("$.heritageDomain", hasSize(1))) + .andExpect(jsonPath("$.providesSupportForMediaType", hasSize(1))) + .andExpect(jsonPath("$.providesSupportForDataActivity", hasSize(3))) + .andExpect(jsonPath("$.providesCapacityBuildingActivity", hasSize(1))) + .andExpect(jsonPath("$.providesAudienceEngagementActivity", hasSize(3))) .andExpect(jsonPath("$.prefLabel[*]", hasSize(2))) // should have Europeana and Zoho proxies .andExpect(jsonPath("$.proxies", hasSize(2))); diff --git a/entity-management-tests/src/integration-test/resources/zoho-deref/aggregator_zoho_euskariana_response.json b/entity-management-tests/src/integration-test/resources/zoho-deref/aggregator_zoho_euskariana_response.json index 2c5cb9d9..eb5f5533 100644 --- a/entity-management-tests/src/integration-test/resources/zoho-deref/aggregator_zoho_euskariana_response.json +++ b/entity-management-tests/src/integration-test/resources/zoho-deref/aggregator_zoho_euskariana_response.json @@ -1,6 +1,8 @@ { - "Capacity_Building": [], - "Public_Email": null, + "Capacity_Building": [ + "Webinars / workshops" + ], + "Public_Email": "info@pubemail.com", "Heritage_Domain": [ "Cultural Heritage" ], @@ -8,14 +10,24 @@ "Last_Activity_Time": "2024-09-04T15:54:48+02:00", "Record_Image": null, "Unsubscribed_Mode": null, - "Geographic_Scope": null, - "Media_Type": [], - "Data_Activity": [], + "Geographic_Scope": "International", + "Media_Type": [ + "Image" + ], + "Data_Activity": [ + "Copyright support", + "Content storage", + "Content quality improvement" + ], "id": "486281000004555255", "Modified_Time": "2024-09-04T15:54:48+02:00", "Created_Time": "2024-06-27T09:19:23+02:00", "Unsubscribed_Time": null, - "Audience_Engagement_Activity": [], + "Audience_Engagement_Activity": [ + "Newsletters", + "Social media engagement", + "Digital curation (e.g. virtual exhibitions, thematic galleries)" + ], "Insitution": { "name": "Euskariana", "id": "486281000000939318"