Skip to content

Commit

Permalink
Implement setRegistryId for CancelRequestItem. Bump patch version
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtnordstrom committed Apr 30, 2024
1 parent deaa244 commit b1a487c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib-ncip-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.olf.rs</groupId>
<artifactId>lib-ncip-cli</artifactId>
<version>0.23.7</version>
<version>0.23.8</version>
<name>lib-ncip-cli</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
2 changes: 1 addition & 1 deletion lib-ncip-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.olf.rs</groupId>
<artifactId>lib-ncip-client</artifactId>
<version>0.23.7</version>
<version>0.23.8</version>
<name>NCIP Client</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public CancelRequestItem setRequestId(String requestId) {
return this;
}

public CancelRequestItem setRegistryId(String registryId) {
this.registryId = registryId;
return this;
}

@Override
public NCIPInitiationData generateNCIP2Object() {
CancelRequestItemInitiationData cancelRequestItemInitiationData = new CancelRequestItemInitiationData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ public void testGenerateNcip1Response() {

@Test
public void testConstructNcip2Response() throws Exception {
CancelRequestItem requestItem = new CancelRequestItem();
CancelRequestItem cancelRequestItem = new CancelRequestItem();
CancelRequestItemResponseData cancelRequestItemResponseData = new CancelRequestItemResponseData();
ItemId itemId = new ItemId();
itemId.setItemIdentifierValue("22334455");
RequestId requestId = new RequestId();
requestId.setRequestIdentifierValue("RESH-99");
cancelRequestItemResponseData.setItemId(itemId);
cancelRequestItemResponseData.setRequestId(requestId);
JSONObject jsonObject = requestItem.constructResponseNcip2Response(cancelRequestItemResponseData);
JSONObject jsonObject = cancelRequestItem.constructResponseNcip2Response(cancelRequestItemResponseData);
assertEquals(jsonObject.getString("itemId"), "22334455");
assertEquals(jsonObject.getString("requestId"), "RESH-99");
}
Expand All @@ -52,6 +52,7 @@ public void testToString() {
cancelRequestItem.setRequestId("123");
cancelRequestItem.setFromAgency("ABC");
cancelRequestItem.setToAgency("CBA");
cancelRequestItem.setRegistryId("44556677");
String asString = cancelRequestItem.toString();
assertTrue(asString.contains("123"));
assertTrue(asString.contains("CBA"));
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.olf.rs</groupId>
<version>0.23.7</version>
<version>0.23.8</version>
<artifactId>lib-ncip-client-proj</artifactId>
<packaging>pom</packaging>
<name>lib-ncip-client-proj</name>
Expand Down

0 comments on commit b1a487c

Please sign in to comment.