From c45674da1dc01bf9f5638e18f053d55994c836c4 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Tue, 1 Dec 2020 16:01:37 +0100 Subject: [PATCH] updated test class --- .../gcube/application/TestGeonaReader.java | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/gcube/application/TestGeonaReader.java b/src/test/java/org/gcube/application/TestGeonaReader.java index 3355dd2..500ef33 100644 --- a/src/test/java/org/gcube/application/TestGeonaReader.java +++ b/src/test/java/org/gcube/application/TestGeonaReader.java @@ -1,6 +1,7 @@ package org.gcube.application; import org.gcube.application.shared.GeoNaDataViewerProfile; +import org.gcube.application.shared.GeoNaItemRef; import org.gcube.common.scope.api.ScopeProvider; public class TestGeonaReader { @@ -10,7 +11,9 @@ public class TestGeonaReader { public static void main(String[] args) throws Exception { - getGeoNaDataViewProfile(); + //System.out.println(getGeoNaDataViewProfile()); + + System.out.println(getLinks()); } @@ -18,11 +21,22 @@ public class TestGeonaReader { System.out.println("getGeoNaDataViewProfile called"); ScopeProvider.instance.set(scope); - GeoNaDataViewerProfileReader gdvp = new GeoNaDataViewerProfileReader("geoportal-data-viewer-app"); - GeoNaDataViewerProfile profile = gdvp.readProfileFromInfrastrucure(); + GeoportalCommon gc = new GeoportalCommon(); + GeoNaDataViewerProfile profile = gc.getGeoNaDataViewProfile(null); System.out.println("Returning profile: "+profile); return profile; } + + + public static GeoNaItemRef getLinks() throws Exception{ + System.out.println("getGeoNaDataViewProfile called"); + + ScopeProvider.instance.set(scope); + GeoportalCommon gc = new GeoportalCommon(); + GeoNaItemRef item = new GeoNaItemRef(new Long(2), "concessione"); + GeoNaItemRef links = gc.getPublicLinksFor(item); + return links; + } }