forked from folio-org/mod-ncip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-1821 Add default patron fee option
- Loading branch information
1 parent
cd69c62
commit 7231ea1
Showing
16 changed files
with
441 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.folio.ncip; | ||
|
||
import io.restassured.response.Response; | ||
import org.junit.Test; | ||
|
||
import java.net.MalformedURLException; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
public class AcceptItem extends TestBase { | ||
|
||
private static final String REQUEST_ID = "de627598-d468-41e0-a849-450940478477"; | ||
@Test | ||
public void acceptItem() throws MalformedURLException { | ||
Response response = postData("src/test/resources/mockdata/ncip-acceptItem.xml"); | ||
String body = response.getBody().prettyPrint(); | ||
assertEquals(200, response.getStatusCode()); | ||
assertTrue(body.contains(REQUEST_ID)); | ||
} | ||
|
||
@Test | ||
public void acceptItemFailFee() throws MalformedURLException { | ||
Response response = postData("src/test/resources/mockdata/ncip-acceptItem-blocked.xml"); | ||
String body = response.getBody().prettyPrint(); | ||
assertEquals(200, response.getStatusCode()); | ||
assertTrue(body.contains("Problem performing AcceptItem")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"amount": 5.0, | ||
"remaining": 5.0, | ||
"status": { | ||
"name": "Open" | ||
}, | ||
"paymentStatus": { | ||
"name": "Outstanding" | ||
}, | ||
"feeFineType": "staff", | ||
"feeFineOwner": "Reshare-ILL", | ||
"metadata": { | ||
"createdDate": "2024-07-23T07:35:12.492+00:00", | ||
"createdByUserId": "7d265701-9b80-5501-bc85-0758b4667022", | ||
"updatedDate": "2024-07-23T07:35:12.492+00:00", | ||
"updatedByUserId": "7d265701-9b80-5501-bc85-0758b4667022" | ||
}, | ||
"userId": "d4a845bd-a326-4916-9cb4-6a5ac1a86155", | ||
"feeFineId": "00fb288d-207a-4caa-9538-d18989367fbc", | ||
"ownerId": "fe2307cf-6f39-4b2e-bb37-7668a2b5accf", | ||
"id": "628e0831-30b0-415f-8b21-944950624926", | ||
"contributors": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"owners": [ | ||
{ | ||
"owner": "Reshare-ILL", | ||
"servicePointOwner": [], | ||
"metadata": { | ||
"createdDate": "2024-07-19T10:08:41.016+00:00", | ||
"createdByUserId": "7d265701-9b80-5501-bc85-0758b4667022", | ||
"updatedDate": "2024-07-19T10:10:48.414+00:00", | ||
"updatedByUserId": "7d265701-9b80-5501-bc85-0758b4667022" | ||
}, | ||
"id": "fe2307cf-6f39-4b2e-bb37-7668a2b5accf" | ||
} | ||
], | ||
"totalRecords": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"feefines": [ | ||
{ | ||
"automatic": false, | ||
"feeFineType": "staff", | ||
"defaultAmount": 5.0, | ||
"ownerId": "fe2307cf-6f39-4b2e-bb37-7668a2b5accf", | ||
"metadata": { | ||
"createdDate": "2024-07-19T10:11:07.117+00:00", | ||
"createdByUserId": "7d265701-9b80-5501-bc85-0758b4667022", | ||
"updatedDate": "2024-07-19T10:11:07.117+00:00", | ||
"updatedByUserId": "7d265701-9b80-5501-bc85-0758b4667022" | ||
}, | ||
"id": "00fb288d-207a-4caa-9538-d18989367fbc" | ||
} | ||
], | ||
"totalRecords": 1, | ||
"resultInfo": { | ||
"totalRecords": 1, | ||
"facets": [], | ||
"diagnostics": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"feefines": [ | ||
], | ||
"totalRecords": 0, | ||
"resultInfo": { | ||
"totalRecords": 0, | ||
"facets": [], | ||
"diagnostics": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"group": "staff", | ||
"desc": "Staff Member", | ||
"id": "3684a786-6671-4268-8ed0-9db82ebca60b", | ||
"expirationOffsetInDays": 730, | ||
"metadata": { | ||
"createdDate": "2024-03-13T00:03:41.447+00:00", | ||
"createdByUserId": "15a65190-1f3e-5dd7-bbd7-a203d6e85a89", | ||
"updatedDate": "2024-05-16T14:06:48.906+00:00", | ||
"updatedByUserId": "15a65190-1f3e-5dd7-bbd7-a203d6e85a89" | ||
} | ||
} |
Oops, something went wrong.