Revision 47052
Added by Alessia Bardi over 7 years ago
modules/dnet-parthenos/trunk/src/test/java/eu/dnetlib/data/collector/plugins/parthenos/ehri/EHRIGraphQLClientTest.java | ||
---|---|---|
3 | 3 |
import java.io.IOException; |
4 | 4 |
import java.io.InputStreamReader; |
5 | 5 |
import java.net.URISyntaxException; |
6 |
import java.net.URL; |
|
6 | 7 |
import java.util.Iterator; |
7 | 8 |
|
8 | 9 |
import eu.dnetlib.rmi.data.CollectorServiceException; |
... | ... | |
49 | 50 |
} |
50 | 51 |
} |
51 | 52 |
|
53 |
@Test |
|
54 |
public void testGetResource() throws IOException { |
|
55 |
String id = "at-001985-ikg_ar_11"; |
|
56 |
String target = "https://portal.ehri-project.eu/units/"+id+"/export"; |
|
57 |
URL url = new URL(target); |
|
58 |
String res = IOUtils.toString(url, "UTF-8"); |
|
59 |
System.out.println(res); |
|
60 |
} |
|
61 |
|
|
52 | 62 |
// @Test |
53 | 63 |
// public void testDotNotation(){ |
54 | 64 |
// JsonObject jsonObject = new JsonParser().parse(simpleOutput).getAsJsonObject(); |
Also available in: Unified diff
Added simple test for EHRI