From e6c79d44e62bfb7fbdf67d2fe4d080dc383f0b19 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 2 Jul 2020 16:02:02 +0200 Subject: [PATCH] - --- .../dhp/oa/graph/dump/ZenodoUploadTest.java | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java index ab2525807..ead2e40ef 100644 --- a/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java +++ b/dhp-workflows/dhp-graph-mapper/src/test/java/eu/dnetlib/dhp/oa/graph/dump/ZenodoUploadTest.java @@ -116,7 +116,7 @@ public class ZenodoUploadTest { data.setTitle("Dump of OpenAIRE Communities related graph"); data.setUpload_type("dataset"); - data.setDescription("this is a fake uploade done for testing purposes"); + data.setDescription("this is a fake upload done for testing purposes"); Creator c = new Creator(); c.setName("Miriam Baglioni"); c.setAffiliation("CNR _ISTI"); @@ -176,22 +176,33 @@ public class ZenodoUploadTest { // .getResource("/eu/dnetlib/dhp/oa/graph/dump/zenodo/science-innovation-policy") // .getPath(), "ScienceandInnovationPolicyStudies"); - ZenodoModel zenodo = new ZenodoModel(); - Metadata data = new Metadata(); - - data.setTitle("Dump of OpenAIRE Communities related graph"); - data.setUpload_type("dataset"); - data.setDescription("this is a fake uploade done for testing purposes"); - Creator c = new Creator(); - c.setName("Miriam Baglioni"); - c.setAffiliation("CNR _ISTI"); - data.setCreators(Arrays.asList(c)); - zenodo.setMetadata(data); - - s.sendMretadata(new Gson().toJson(zenodo)); - - s.publish(); +// ZenodoModel zenodo = new ZenodoModel(); +// Metadata data = new Metadata(); +// +// data.setTitle("Dump of OpenAIRE Communities related graph"); +// data.setUpload_type("dataset"); +// data.setDescription("this is a fake uploade done for testing purposes"); +// Creator c = new Creator(); +// c.setName("Miriam Baglioni"); +// c.setAffiliation("CNR _ISTI"); +// data.setCreators(Arrays.asList(c)); +// zenodo.setMetadata(data); +// +// s.sendMretadata(new Gson().toJson(zenodo)); +// +// s.publish(); } + @Test + public void testConnectionOnly() throws IOException { + APIClient s = new APIClient( + "https://sandbox.zenodo.org/api/deposit/depositions", + "5ImUj0VC1ICg4ifK5dc3AGzJhcfAB4osxrFlsr8WxHXxjaYgCE0hY8HZcDoe"); + + int tmp = s.connect(); + + System.out.println(tmp); + } + }