1
|
package eu.dnetlib.data.utils;
|
2
|
|
3
|
import org.junit.Ignore;
|
4
|
import org.junit.Test;
|
5
|
|
6
|
import eu.dnetlib.data.mdstore.plugins.objects.MdRecord;
|
7
|
|
8
|
public class BibTexConverterTest {
|
9
|
|
10
|
@Test
|
11
|
@Ignore
|
12
|
public void testAsBibTex_1() {
|
13
|
|
14
|
final MdRecord record = new MdRecord();
|
15
|
|
16
|
record.setId("1234");
|
17
|
record.setTitle("The D-NET software toolkit A framework for the realization, maintenance, and operation of aggregative infrastructures");
|
18
|
|
19
|
record.getCreators().add("Manghi P.");
|
20
|
record.getCreators().add("Artini M.");
|
21
|
|
22
|
record.setPublisher("Emerald, Bradford, Regno Unito");
|
23
|
record.getDois().add("10.1108/PROG-08-2013-0045");
|
24
|
record.setDate(2014);
|
25
|
record.setSource("Program (Lond., 1966) 48 (2014): 322–354. doi:10.1108/PROG-08-2013-0045");
|
26
|
record.setType("Article");
|
27
|
|
28
|
final String bib = BibTexConverter.asBibTex(record);
|
29
|
|
30
|
System.out.println(bib);
|
31
|
|
32
|
}
|
33
|
|
34
|
@Test
|
35
|
public void testAsBibTex_article_source_1() {
|
36
|
|
37
|
final MdRecord record = new MdRecord();
|
38
|
|
39
|
record.setId("1234");
|
40
|
record.setType("Article");
|
41
|
|
42
|
record.setSource("Internet of Things 13 (2020): 1–14");
|
43
|
|
44
|
final String bib = BibTexConverter.asBibTex(record);
|
45
|
|
46
|
System.out.println(bib);
|
47
|
|
48
|
}
|
49
|
|
50
|
}
|