AriadnePlus/dnet-ariadneplus/src/test/java/eu/dnetlib/data/collector/plugins/ariadneplus/thanados/ThanadosIteratorTest.java

33 lines
816 B
Java
Raw Normal View History

2022-04-11 18:55:54 +02:00
package eu.dnetlib.data.collector.plugins.ariadneplus.thanados;
import org.junit.Ignore;
import org.junit.Test;
@Ignore
public class ThanadosIteratorTest {
2022-05-05 15:26:39 +02:00
private String sitelist = "https://thanados.net/sites/sitelist";
2022-04-11 18:55:54 +02:00
ThanadosIterator it;
@Test
public void testDownloadList(){
it = new ThanadosIterator("", sitelist);
it.getIdentifiers().stream().forEach(id -> System.out.println(id));
System.out.println(it.getIdentifiers().size());
}
@Test
2022-05-05 15:26:39 +02:00
public void testDownload(){
2022-04-11 18:55:54 +02:00
int count = 0;
2022-04-15 14:42:59 +02:00
it = new ThanadosIterator("https://thanados.openatlas.eu/api/0.3/subunits", sitelist);
2022-04-11 18:55:54 +02:00
while(it.hasNext()){
it.next();
count++;
2022-04-15 14:42:59 +02:00
System.out.println(count);
2022-04-11 18:55:54 +02:00
}
2022-04-15 14:42:59 +02:00
System.out.println("DONE");
2022-04-11 18:55:54 +02:00
}
2022-05-05 15:26:39 +02:00
2022-04-11 18:55:54 +02:00
}