1
|
package eu.dnetlib.data.collector.filesystem;
|
2
|
|
3
|
import java.util.HashMap;
|
4
|
|
5
|
import org.junit.Assert;
|
6
|
import org.junit.Ignore;
|
7
|
import org.junit.Test;
|
8
|
|
9
|
import eu.dnetlib.data.collector.plugins.filesystem.FilesystemCollectorPlugin;
|
10
|
import eu.dnetlib.data.collector.rmi.CollectorServiceException;
|
11
|
import eu.dnetlib.data.collector.rmi.InterfaceDescriptor;
|
12
|
|
13
|
public class FileSystemCollectorPluginTest {
|
14
|
|
15
|
@Ignore
|
16
|
@Test
|
17
|
public void test() throws CollectorServiceException {
|
18
|
InterfaceDescriptor descr = new InterfaceDescriptor();
|
19
|
HashMap<String, String> params = new HashMap<String, String>();
|
20
|
params.put("extensions", "*.xml");
|
21
|
descr.setBaseUrl("file:///home/sandro/PycharmProjects/datacite/output");
|
22
|
descr.setParams(params);
|
23
|
|
24
|
FilesystemCollectorPlugin plugin = new FilesystemCollectorPlugin();
|
25
|
Iterable<String> result = plugin.collect(descr, null, null);
|
26
|
int i = 0;
|
27
|
for (String s : result) {
|
28
|
i++;
|
29
|
Assert.assertNotNull(s);
|
30
|
}
|
31
|
System.out.println("Total " + i);
|
32
|
|
33
|
}
|
34
|
|
35
|
}
|