Skip to content

Commit 32e4738

Browse files
clean tests code
1 parent 3788102 commit 32e4738

File tree

3 files changed

+1
-53
lines changed

3 files changed

+1
-53
lines changed

src/main/java/org/semantics/apigateway/service/AbstractEndpointService.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,7 @@ private List<TransformedApiResponse> filterById(List<TransformedApiResponse> api
364364
String id = ids.get(0);
365365

366366
return apiResponses.stream().map(x -> {
367-
List<AggregatedResourceBody> collection = x.getCollection();
368-
List<AggregatedResourceBody> filtered = collection.stream().filter(y -> y.getShortForm().equalsIgnoreCase(id) || y.getIri().equals(id)).toList();
367+
List<AggregatedResourceBody> filtered = x.getCollection().stream().filter(y -> y.getShortForm().equalsIgnoreCase(id) || y.getIri().equals(id)).toList();
369368
x.setCollection(filtered);
370369
return x;
371370
})

src/test/java/org/semantics/apigateway/ApplicationTestAbstract.java

-47
Original file line numberDiff line numberDiff line change
@@ -429,53 +429,6 @@ protected Map<String, Object> createGndFixture() {
429429

430430
protected Map<String, Object> createColiConc(){
431431
Map<String, Object> fixture = new HashMap<>();
432-
433-
// { "@id"="http://bartoc.org/en/node/15", "@type"="https://w3id.org/mod#SemanticArtefact", "accessRights"=null, "accrualMethod"=null, "accrualPeriodicity"=null, "backend_type"="jskos2", "bibliographicCitation"=null, "competencyQuestion"=null, "contactPoint"=null, "contributor"=["Mpaunescu", "Sabrina Gaab", "David-Benjamin Rohrer", "JakobVoss"], "coverage"=null, "created"="2013-08-14T14:05:00Z", "createdWith"=null, "creator"=null, "descriptions"=[""EuroVoc is a multilingual, multidisciplinary thesaurus covering the activities of the EU, the European Parliament in particular. It contains terms in 23 EU languages (Bulgarian, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hungarian, Italian, Latvian, Lithuanian, Maltese, Polish, Portuguese, Romanian, Slovak, Slovenian, Spanish and Swedish), plus in three languages of countries which are candidates for EU accession: македонски (mk), shqip (sq) and cрпски (sr).
434-
//
435-
// It is a multi-disciplinary thesaurus covering fields which are sufficiently wide-ranging to encompass both Community and national points of view, with a certain emphasis on parliamentary activities. EuroVoc is a controlled set of vocabulary which can be used outside the EU institutions, particularly by parliaments.
436-
//
437-
// The aim of the thesaurus is to provide the information management and dissemination services with a coherent indexing tool for the effective management of their documentary resources and to enable users to carry out documentary searches using controlled vocabulary.""], "hasFormat"=["http://bartoc.org/en/Format/Online",
438-
// "http://bartoc.org/en/Format/PDF",
439-
// "http://bartoc.org/en/Format/SKOS",
440-
// "http://bartoc.org/en/Format/XML",
441-
// "http://bartoc.org/en/Format/RDF",
442-
// "http://bartoc.org/en/Format/Spreadsheet",
443-
// "http://bartoc.org/en/Format/XSD",
444-
// "http://bartoc.org/en/Format/Database"], "identifier"="http://publications.europa.eu/resource/dataset/eurovoc", "includedInDataCatalog"=["https://skosmos.bartoc.org/15/",
445-
// "https://publications.europa.eu/webapi/rdf/sparql"], "iri"="http://bartoc.org/en/node/15", "keywords"=null, "label"="Multilingual Thesaurus of the European Union", "landingPage"=null, "language"=["bg",
446-
// "ca",
447-
// "hr",
448-
// "cs",
449-
// "da",
450-
// "nl",
451-
// "en",
452-
// "et",
453-
// "fi",
454-
// "fr",
455-
// "de",
456-
// "el",
457-
// "hu",
458-
// "it",
459-
// "lv",
460-
// "lt",
461-
// "mk",
462-
// "mt",
463-
// "pl",
464-
// "pt",
465-
// "ro",
466-
// "sr",
467-
// "sk",
468-
// "sl",
469-
// "es",
470-
// "sv"], "license"="http://creativecommons.org/publicdomain/zero/1.0/", "modified"="2023-09-12T09:18:03.554Z", "obsolete"=false, "publisher"=["Publications Office of the European Union"], "rightsHolder"=null, "semanticArtefactRelation"=null, "short_form"="EuroVoc", "source"="https://coli-conc.gbv.de/api", "source_name"="coli-conc", "source_url"=null, "status"=null, "subject"=["http://dewey.info/class/0/e23/",
471-
// "http://dewey.info/class/001/e23/",
472-
// "http://eurovoc.europa.eu/4704",
473-
// "http://eurovoc.europa.eu/1172",
474-
// "http://eurovoc.europa.eu/77",
475-
// "http://eurovoc.europa.eu/6894",
476-
// "http://www.iskoi.org/ilc/2/class/V",
477-
// "http://www.iskoi.org/ilc/2/class/tue"], "synonyms"=null, "type"="http://www.w3.org/2004/02/skos/core#ConceptScheme", "version"=null, "versionIRI"=null, "wasGeneratedBy"=null}
478-
479432
fixture.put("iri", "http://bartoc.org/en/node/15");
480433
fixture.put("source_url", null);
481434
fixture.put("backend_type", "jskos2");

src/test/java/org/semantics/apigateway/ArtefactsServiceTest.java

-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ public void testGetAllArtefacts() {
5656
index = indexOfShortFormAndBackendType(responseList, "GND", "gnd");
5757
assertMapEquality(response, createGndFixture(), size, index);
5858

59-
index = indexOfShortFormAndBackendType(responseList, "gender", "jskos");
60-
assertMapEquality(response, createDanteFixture(), size, index);
61-
62-
6359
index = indexOfShortFormAndBackendType(responseList, "gender", "jskos");
6460
assertMapEquality(response, createDanteFixture(), size, index);
6561

0 commit comments

Comments
 (0)