From acc04b0ace6c54acbe0a7aa06925ef3ce138d6c4 Mon Sep 17 00:00:00 2001 From: Enrico Ottonello Date: Wed, 8 Sep 2021 17:02:16 +0200 Subject: [PATCH] merged test cases --- .../GraphDbReaderAndESIndexTest.java | 110 +++++++++++++++--- 1 file changed, 95 insertions(+), 15 deletions(-) diff --git a/dnet-ariadneplus-graphdb-publisher/test/java/eu/dnetlib/ariadneplus/GraphDbReaderAndESIndexTest.java b/dnet-ariadneplus-graphdb-publisher/test/java/eu/dnetlib/ariadneplus/GraphDbReaderAndESIndexTest.java index 66cb721..beee138 100644 --- a/dnet-ariadneplus-graphdb-publisher/test/java/eu/dnetlib/ariadneplus/GraphDbReaderAndESIndexTest.java +++ b/dnet-ariadneplus-graphdb-publisher/test/java/eu/dnetlib/ariadneplus/GraphDbReaderAndESIndexTest.java @@ -35,7 +35,17 @@ public class GraphDbReaderAndESIndexTest { // @Ignore public void uploadAMCRFieldworkTest() throws Exception { boolean isRecord = true; - String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AMCR/E61E0F4E-268F-39E4-8EDB-A431AFC505AA"; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AIS%20CR/E61E0F4E-268F-39E4-8EDB-A431AFC505AA"; + String datasource = "amcr"; + String collectionId = "oai"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test +// @Ignore + public void uploadAMCRFieldworkEventOnlyPeriodoTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AIS%20CR/849F814F-5892-3408-AD5E-904938B4492A"; String datasource = "amcr"; String collectionId = "oai"; readAndIndexTest(isRecord, recordId, datasource, collectionId); @@ -45,7 +55,7 @@ public class GraphDbReaderAndESIndexTest { // @Ignore public void uploadAMCRDocumentTest() throws Exception { boolean isRecord = true; - String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/AMCR/FC59581D-DC3A-31DA-922A-98DE764F3D76"; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AIS%20CR/FC59581D-DC3A-31DA-922A-98DE764F3D76"; String datasource = "amcr"; String collectionId = "oai"; readAndIndexTest(isRecord, recordId, datasource, collectionId); @@ -55,7 +65,7 @@ public class GraphDbReaderAndESIndexTest { // @Ignore public void uploadAMCRSiteTest() throws Exception { boolean isRecord = true; - String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AMCR/3C7EC936-A7CA-3720-B3DC-413A25754FD4"; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AIS%20CR/3C7EC936-A7CA-3720-B3DC-413A25754FD4"; String datasource = "amcr"; String collectionId = "oai"; readAndIndexTest(isRecord, recordId, datasource, collectionId); @@ -65,22 +75,12 @@ public class GraphDbReaderAndESIndexTest { // @Ignore public void uploadAMCRIndividualFindTest() throws Exception { boolean isRecord = true; - String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AMCR/98D717C4-410F-35C6-8072-FABA7686B4A3"; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/AIS%20CR/98D717C4-410F-35C6-8072-FABA7686B4A3"; String datasource = "amcr"; String collectionId = "oai"; readAndIndexTest(isRecord, recordId, datasource, collectionId); } - @Test -// @Ignore - public void uploadADSRecordTest() throws Exception { - boolean isRecord = true; - String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/34E3811A-0BAD-3832-B3A0-3139E8A0285C"; - String datasource = "ads"; - String collectionId = "271"; - readAndIndexTest(isRecord, recordId, datasource, collectionId); - } - @Test // @Ignore public void uploadADSRecordWithNativeFromUntilTest() throws Exception { @@ -205,7 +205,7 @@ public class GraphDbReaderAndESIndexTest { // @Ignore public void uploadROADTest() throws Exception { boolean isRecord = true; - String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/FC70B370-C489-31C5-B1D4-339CFD28CF2B"; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/F182086F-1460-3D1E-88A6-0168370D25A1"; String datasource = "road"; String collectionId = "sites"; readAndIndexTest(isRecord, recordId, datasource, collectionId); @@ -251,6 +251,86 @@ public class GraphDbReaderAndESIndexTest { readAndIndexTest(isRecord, recordId, datasource, collectionId); } + @Test +// @Ignore + public void uploadFastiTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/FASTIONLINE/532D492C-B141-30D0-886A-1E69C2C20474"; + String datasource = "fasti"; + String collectionId = "fieldwork"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test +// @Ignore + public void uploadDansClosedAccessTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/D1C1D6AD-320D-3616-B75D-F2E2C3DA7F3E"; + String datasource = "dans"; + String collectionId = "easy"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test +// @Ignore + public void uploadDansRestrictedAccessTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/221AAEC8-CC9B-310C-B800-0DFE34850E0B"; + String datasource = "dans"; + String collectionId = "easy"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test +// @Ignore + public void uploadDansOpenAccessTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/B251A0FE-EFE0-341B-A8B3-E0813CC82856"; + String datasource = "dans"; + String collectionId = "easy"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test +// @Ignore + public void uploadConicetCollectionTest() throws Exception { + boolean isRecord = false; + String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/IDACOR%20%28CONICET%2FUNC%29/8B238475-2BA7-3036-88C0-968E9A642E64"; + String datasource = "conicet"; + String collectionId = "CollectionInfo"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test +// @Ignore + public void uploadConicetRecordTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/CONICET/0CD6BF2E-4AB7-39B6-937E-7DD59092DD3F"; + String datasource = "conicet"; + String collectionId = "fieldwork"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test +// @Ignore + public void uploadNaraTest() throws Exception { + boolean isRecord = true; + String recordId = "https://ariadne-infrastructure.eu/aocat/Resource/07121539-04BD-3896-8E4B-22EEDDD400A8"; + String datasource = "nara"; + String collectionId = "fieldworkreport"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + + @Test +// @Ignore + public void uploadINFNTest() throws Exception { + boolean isRecord = false; + String recordId = "https://ariadne-infrastructure.eu/aocat/Collection/INFN/5AE70226-82A9-3B06-9E25-8FB71B64C51C"; + String datasource = "infn"; + String collectionId = "firenze"; + readAndIndexTest(isRecord, recordId, datasource, collectionId); + } + private void readAndIndexTest(boolean isRecord, String recordId, String datasource, String collectionId) throws Exception { final ClassPathResource resource = new ClassPathResource("application.properties"); Properties appProps = new Properties();