Project

General

Profile

« Previous | Next » 

Revision 54893

update test and plugin implementation to consider meta elements with "citation_pdf_url" as value for the attribute name

View differences:

DSpacePDFLinkPluginsTest.java
1 1
package eu.dnetlib.download.plugin;
2 2

  
3
import eu.dnetlib.data.download.rmi.DownloadPlugin;
3 4
import org.junit.Assert;
4 5
import org.junit.Ignore;
5 6
import org.junit.Test;
7
import org.springframework.beans.factory.annotation.Autowired;
6 8

  
9
import java.util.ArrayList;
10
import java.util.List;
11

  
7 12
/**
8 13
 * Created by sandro on 5/15/17.
9 14
 */
10 15
@Ignore
11 16
public class DSpacePDFLinkPluginsTest {
12 17

  
18
    @Autowired
19
    DSpacePDFLinkPlugins dp;
13 20

  
14 21

  
15 22
    @Test
......
20 27
        Assert.assertEquals(s1, "http://acikerisim.baskent.edu.tr/bitstream/11727/2340/1/10008302.pdf");
21 28
    }
22 29

  
30
//    @Test
31
//    public void testDOI() {
32
//        final DSpacePDFLinkPlugins plugin = new DSpacePDFLinkPlugins();
33
//
34
//        final String s1 = plugin.extractURL("http://hdl.handle.net/10017/29866");
35
//       // Assert.assertEquals(s1, "http://acikerisim.baskent.edu.tr/bitstream/11727/2340/1/10008302.pdf");
36
//        System.out.println(s1);
37
//    }
38

  
39

  
23 40
    @Test
24
    public void testDOI() {
41
    public void testURLUniTO(){
25 42
        final DSpacePDFLinkPlugins plugin = new DSpacePDFLinkPlugins();
43
//        List<String> lst = new ArrayList<>();
44
//        lst.add("^http.*pdf$");
45
//        plugin.setRegularExpression(lst);
46
        final String s1 = plugin.extractURL("http://hdl.handle.net/2318/37517");
47
        Assert.assertEquals("https://iris.unito.it/bitstream/2318/37517/1/2002%20JBC%20-%20Integrin-induced%20epidermal%20growth%20factor%20%28EGF%29%20receptor%20activation%20requires%20c-Src%20and%20p130Cas.pdf",s1);
48
    }
26 49

  
27
        final String s1 = plugin.extractURL("http://hdl.handle.net/10017/29866");
28
       // Assert.assertEquals(s1, "http://acikerisim.baskent.edu.tr/bitstream/11727/2340/1/10008302.pdf");
29
        System.out.println(s1);
50
    @Test
51
    public void downloadTest(){
52

  
30 53
    }
31 54

  
32 55

  
56

  
33 57
}

Also available in: Unified diff