Project

General

Profile

« Previous | Next » 

Revision 56854

Test DataciteESIterator's decompression method

View differences:

ReadExcelTest.java
16 16
public class ReadExcelTest {
17 17
	private InterfaceDescriptor descr;
18 18
	private Read r;
19
	private Object asserNotNul;
20 19

  
20
	private String excelPath = "eu/dnetlib/data/collector/plugins/excel/fwf_projects_100.xlsx";
21

  
21 22
	@Before
22 23
	public void setUp() throws Exception {
23 24
		descr = new InterfaceDescriptor();
24 25
		descr.setBaseUrl("https://pf.fwf.ac.at/en/research-in-practice/project-finder.xlsx?&&&search%5Bcall%5D=&search%5Bdecision_board_ids%5D=&search%5Bend_date%5D=&search%5Binstitute_name%5D=&search%5Blead_firstname%5D=&search%5Blead_lastname%5D=&search%5Bper_page%5D=10&search%5Bproject_number%5D=&search%5Bproject_title%5D=&search%5Bscience_discipline_id%5D=&search%5Bstart_date%5D=&search%5Bstatus_id%5D=&search%5Bwhat%5D=&action=index&controller=projects&locale=en&per_page=10" );
25 26
		HashMap<String, String> params = new HashMap<String, String>();
26 27

  
27
		params.put("argument", "{\"replace\":{\"header\":[{\"from\":\"&\",\"to\":\"and\"}],\"body\":[{\"from\":\"\\n\",\"to\":\" \"}]}," +
28
				"\"replace_currency\":[{\"from\":\"$\",\"to\":\"€\"}],\"col_currency\":10}");
28
		params.put("argument", "{\"replace\":{\"header\":[{\"from\":\"&\",\"to\":\"and\"}],\"body\":[{\"from\":\"\\n\",\"to\":\" \"}]}}");
29 29

  
30
		params.put("argument", "{\"replace\":{\"header\":[{\"from\":\"&\",\"to\":\"and\"}],\"body\":[{\"from\":\"\\n\",\"to\":\" \"}]}," +
31
				"\"replace_currency\":[{\"from\":\"$\",\"to\":\"€\"}],\"col_currency\":10}");
32 30
		params.put("header_row","4");
33 31
		params.put("tmp_file","//tmp//fwf.xslx");
34 32
		params.put("remove_empty_lines","yes");
......
54 52
//		params.put("separator", ",");
55 53
//		params.put("quote","\"");
56 54
//		descr.setParams(params);
57
//		r = new Read(descr);
58
//		r.setCollector(new HttpCSVCollectorPlugin());
55
		r = new Read(descr);
56
		r.setCollector(new HttpCSVCollectorPlugin());
59 57
	}
60 58

  
61 59
	@Test
62
	@Ignore
60
	//@Ignore
63 61
	public void readExcelFromUrl()throws Exception{
64 62
		Iterator<String> it = r.parseFile().iterator();
65 63
		int i = 0;

Also available in: Unified diff