From 29a91a606626f06499870462cc23f2e4aa649f7a Mon Sep 17 00:00:00 2001 From: Vincenzo Mecca Date: Wed, 27 Mar 2024 16:26:25 +0100 Subject: [PATCH] [DSC-1589] Fixes ResearcherProfileRestRepositoryIT --- .../ResearcherProfileRestRepositoryIT.java | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ResearcherProfileRestRepositoryIT.java b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ResearcherProfileRestRepositoryIT.java index 165bc0c8abd7..53e6abeda208 100644 --- a/dspace-server-webapp/src/test/java/org/dspace/app/rest/ResearcherProfileRestRepositoryIT.java +++ b/dspace-server-webapp/src/test/java/org/dspace/app/rest/ResearcherProfileRestRepositoryIT.java @@ -2289,7 +2289,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation String authToken = getAuthToken(ePerson.getEmail(), password); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/publications", "ALL")))) + .content(getPatchContent( + asList(new ReplaceOperation("/orcid/publications", "ALL")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2298,7 +2299,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation assertThat(queueRecords, has(orcidQueueRecordWithEntity(publication))); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/fundings", "ALL")))) + .content( + getPatchContent(asList(new ReplaceOperation("/orcid/fundings", "ALL")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2309,7 +2311,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation assertThat(queueRecords, has(orcidQueueRecordWithEntity(secondFunding))); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/products", "ALL")))) + .content( + getPatchContent(asList(new ReplaceOperation("/orcid/products", "ALL")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2321,7 +2324,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation assertThat(queueRecords, has(orcidQueueRecordWithEntity(product))); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/patents", "ALL")))) + .content( + getPatchContent(asList(new ReplaceOperation("/orcid/patents", "ALL")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2335,7 +2339,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation assertThat(queueRecords, has(orcidQueueRecordWithEntity(secondPatent))); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/publications", "DISABLED")))) + .content(getPatchContent( + asList(new ReplaceOperation("/orcid/publications", "DISABLED")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2348,7 +2353,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation assertThat(queueRecords, has(orcidQueueRecordWithEntity(secondPatent))); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/fundings", "DISABLED")))) + .content(getPatchContent( + asList(new ReplaceOperation("/orcid/fundings", "DISABLED")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2359,7 +2365,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation assertThat(queueRecords, has(orcidQueueRecordWithEntity(secondPatent))); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/products", "DISABLED")))) + .content(getPatchContent( + asList(new ReplaceOperation("/orcid/products", "DISABLED")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2369,7 +2376,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation assertThat(queueRecords, has(orcidQueueRecordWithEntity(secondPatent))); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/patents", "DISABLED")))) + .content(getPatchContent( + asList(new ReplaceOperation("/orcid/patents", "DISABLED")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2378,7 +2386,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation configurationService.setProperty("orcid.linkable-metadata-fields.ignore", "crisfund.coinvestigators"); getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/fundings", "ALL")))) + .content( + getPatchContent(asList(new ReplaceOperation("/orcid/fundings", "ALL")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk()); @@ -2388,7 +2397,8 @@ public void testOrcidSynchronizationPreferenceUpdateForceOrcidQueueRecalculation // verify that no ORCID queue recalculation is done if the preference does not change getClient(authToken).perform(patch("/api/eperson/profiles/{id}", ePersonId.toString()) - .content(getPatchContent(asList(new ReplaceOperation("/orcid/fundings", "ALL")))) + .content( + getPatchContent(asList(new ReplaceOperation("/orcid/fundings", "ALL")))) .contentType(MediaType.APPLICATION_JSON_VALUE)) .andExpect(status().isOk());