From 4694d7a57d3352cbd2dc3ac96666f0e3d5b5aa4c Mon Sep 17 00:00:00 2001 From: Volodymyr_Rohach Date: Thu, 25 Jan 2024 14:26:39 +0200 Subject: [PATCH] MODINV-984: Properties changed. --- src/main/java/org/folio/inventory/resources/MoveApi.java | 8 ++++---- src/test/java/api/holdings/HoldingsApiMoveExamples.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/folio/inventory/resources/MoveApi.java b/src/main/java/org/folio/inventory/resources/MoveApi.java index b627d19e3..14216ddb0 100644 --- a/src/main/java/org/folio/inventory/resources/MoveApi.java +++ b/src/main/java/org/folio/inventory/resources/MoveApi.java @@ -48,8 +48,8 @@ public class MoveApi extends AbstractInventoryResource { public static final String ITEMS_PROPERTY = "items"; public static final String HOLDINGS_RECORDS_PROPERTY = "holdingsRecords"; public static final String HOLDINGS_STORAGE = "/holdings-storage/holdings"; - private static final String HOLDING_ITEMS_PROPERTY = "holdingItems"; - private static final String BARE_HOLDING_ITEMS_PROPERTY = "bareHoldingItems"; + private static final String HOLDINGS_ITEMS_PROPERTY = "holdingsItems"; + private static final String BARE_HOLDINGS_ITEMS_PROPERTY = "bareHoldingsItems"; public MoveApi(final Storage storage, final HttpClient client) { super(storage, client); @@ -184,8 +184,8 @@ private List updateInstanceIdForHoldings(String toInstanceId, Li } private void removeExtraRedundantFields(JsonObject json) { - json.remove(HOLDING_ITEMS_PROPERTY); - json.remove(BARE_HOLDING_ITEMS_PROPERTY); + json.remove(HOLDINGS_ITEMS_PROPERTY); + json.remove(BARE_HOLDINGS_ITEMS_PROPERTY); } private void updateHoldings(RoutingContext routingContext, WebContext context, List idsToUpdate, diff --git a/src/test/java/api/holdings/HoldingsApiMoveExamples.java b/src/test/java/api/holdings/HoldingsApiMoveExamples.java index 38d6dfe4e..71581fe13 100644 --- a/src/test/java/api/holdings/HoldingsApiMoveExamples.java +++ b/src/test/java/api/holdings/HoldingsApiMoveExamples.java @@ -214,14 +214,14 @@ public void canMoveHoldingsToDifferentInstanceWithExtraRedundantFields() throws JsonObject firstJsonHoldingsAsRequest = new HoldingRequestBuilder().forInstance(oldInstanceId).create(); final UUID createHoldingsRecord1 = holdingsStorageClient.create(firstJsonHoldingsAsRequest - .put("holdingItems", new JsonArray().add(new JsonObject().put("id", UUID.randomUUID())).add(new JsonObject().put("id", UUID.randomUUID()))) - .put("bareHoldingItems", new JsonArray().add(new JsonObject().put("id", UUID.randomUUID())).add(new JsonObject().put("id", UUID.randomUUID())))) + .put("holdingsItems", new JsonArray().add(new JsonObject().put("id", UUID.randomUUID())).add(new JsonObject().put("id", UUID.randomUUID()))) + .put("bareHoldingsItems", new JsonArray().add(new JsonObject().put("id", UUID.randomUUID())).add(new JsonObject().put("id", UUID.randomUUID())))) .getId(); JsonObject secondJsonHoldingsAsRequest = new HoldingRequestBuilder().forInstance(oldInstanceId).create(); final UUID createHoldingsRecord2 = holdingsStorageClient.create(secondJsonHoldingsAsRequest - .put("holdingItems", new JsonArray().add(new JsonObject().put("id", UUID.randomUUID())).add(new JsonObject().put("id", UUID.randomUUID()))) - .put("bareHoldingItems", new JsonArray().add(new JsonObject().put("id", UUID.randomUUID())).add(new JsonObject().put("id", UUID.randomUUID())))) + .put("holdingsItems", new JsonArray().add(new JsonObject().put("id", UUID.randomUUID())).add(new JsonObject().put("id", UUID.randomUUID()))) + .put("bareHoldingsItems", new JsonArray().add(new JsonObject().put("id", UUID.randomUUID())).add(new JsonObject().put("id", UUID.randomUUID())))) .getId(); Assert.assertNotEquals(createHoldingsRecord1, createHoldingsRecord2);