1
|
package eu.dnetlib.data.collector.plugins.datasets;
|
2
|
|
3
|
import java.net.URL;
|
4
|
import java.util.HashMap;
|
5
|
|
6
|
import eu.dnetlib.data.collector.rmi.CollectorServiceException;
|
7
|
import eu.dnetlib.data.collector.rmi.InterfaceDescriptor;
|
8
|
import org.junit.Assert;
|
9
|
import org.junit.Before;
|
10
|
import org.junit.Ignore;
|
11
|
import org.junit.Test;
|
12
|
@Ignore
|
13
|
public class DatasetsByProjectIteratorTest {
|
14
|
|
15
|
@Before
|
16
|
public void setUp() throws Exception {}
|
17
|
|
18
|
@Test
|
19
|
public void test() throws CollectorServiceException {
|
20
|
URL resource = DatasetsByProjectIteratorTest.class.getResource("pangaea-eu-projects_Openaire.csv");
|
21
|
InterfaceDescriptor descr = new InterfaceDescriptor();
|
22
|
HashMap<String, String> params = new HashMap<String, String>();
|
23
|
descr.setBaseUrl(resource.toString());
|
24
|
descr.setParams(params);
|
25
|
DatasetsByProjectPlugin plugin = new DatasetsByProjectPlugin();
|
26
|
Iterable<String> result = plugin.collect(descr, "", "");
|
27
|
|
28
|
int i = 0;
|
29
|
for (String s : result) {
|
30
|
Assert.assertNotNull(s);
|
31
|
System.out.println(s);
|
32
|
//System.out.println("Parsed " + i++);
|
33
|
break;
|
34
|
}
|
35
|
|
36
|
}
|
37
|
|
38
|
}
|