1
|
package unitest;
|
2
|
|
3
|
import eu.dnetlib.repo.manager.config.RepoManagerContextLoaderListener;
|
4
|
import eu.dnetlib.repo.manager.utils.OaiTools;
|
5
|
import org.junit.Test;
|
6
|
import org.junit.runner.RunWith;
|
7
|
import org.springframework.test.context.ContextConfiguration;
|
8
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
9
|
|
10
|
@RunWith(SpringJUnit4ClassRunner.class)
|
11
|
@ContextConfiguration(classes = RepoManagerContextLoaderListener.class)
|
12
|
//@WebAppConfiguration
|
13
|
public class ValidatorTest {
|
14
|
|
15
|
|
16
|
@Test
|
17
|
public void identiFy(){
|
18
|
|
19
|
String url = "https://repozitorij.srce.unizg.hr/oai";
|
20
|
|
21
|
|
22
|
System.out.println("Identify repository with url : " + url);
|
23
|
try {
|
24
|
System.out.println(OaiTools.identifyRepository(url));
|
25
|
} catch (Exception e) {
|
26
|
System.out.println(e);
|
27
|
}
|
28
|
}
|
29
|
|
30
|
|
31
|
}
|