From 4e5f35cba961cb8cd94fd89032b1c8ce5123d4b9 Mon Sep 17 00:00:00 2001 From: Stig Norland Date: Tue, 17 Dec 2024 15:47:27 +0100 Subject: [PATCH] more tests --- .../nva/search/SearchResourceHandler.java | 1 + .../resources/sample_opensearch_response.json | 33 +++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/search-handlers/src/main/java/no/unit/nva/search/SearchResourceHandler.java b/search-handlers/src/main/java/no/unit/nva/search/SearchResourceHandler.java index eb5a3c688..98763be79 100644 --- a/search-handlers/src/main/java/no/unit/nva/search/SearchResourceHandler.java +++ b/search-handlers/src/main/java/no/unit/nva/search/SearchResourceHandler.java @@ -67,6 +67,7 @@ protected String processInput(Void input, RequestInfo requestInfo, Context conte }; } + @JacocoGenerated @Override protected void addAdditionalHeaders(Supplier> additionalHeaders) { super.addAdditionalHeaders(() -> Map.of(HttpHeaders.VARY, HttpHeaders.ACCEPT)); diff --git a/search-handlers/src/test/resources/sample_opensearch_response.json b/search-handlers/src/test/resources/sample_opensearch_response.json index dfda20428..5851d2c2c 100644 --- a/search-handlers/src/test/resources/sample_opensearch_response.json +++ b/search-handlers/src/test/resources/sample_opensearch_response.json @@ -24,6 +24,23 @@ "id": "http://localhost/publication/f367b260-c15e-4d0f-b197-e1dc0e9eb0e8", "identifier": "f367b260-c15e-4d0f-b197-e1dc0e9eb0e8", "doi": "https://doi.org/10.1016/j.is.2016.09.004", + "additionalIdentifiers": [ + { + "sourceName": "brage@ffi", + "type": "HandleIdentifier", + "value": "https://hdl.handle.net/20.500.12242/2287" + }, + { + "sourceName": "cristin@hibo", + "type": "ScopusIdentifier", + "value": "2-s2.0-84949324400" + }, + { + "sourceName": "cristin@hibo", + "type": "CristinIdentifier", + "value": "1133971" + } + ], "entityDescription": { "contributorsPreview": [ { @@ -39,7 +56,12 @@ { "name": "Nørvåg, Kjetil" } - ] + ], + "reference": { + "publicationContext": { + "onlineIssn": "0167-9236" + } + } }, "title": "Exploratory product search using top-k join queries", "description": "the description", @@ -80,7 +102,14 @@ { "name": "Nørvåg, Kjetil" } - ] + ], + "reference": { + "publicationContext": { + "series": { + "printIssn": "0167-9236" + } + } + } }, "title": "Exploratory product search using top-k join queries", "description": "the description",