forked from D-Net/dnet-hadoop
Compare commits
3 Commits
b572f56763
...
9610224671
Author | SHA1 | Date |
---|---|---|
Miriam Baglioni | 9610224671 | |
Miriam Baglioni | aa45b4df9b | |
Miriam Baglioni | 052c837843 |
|
@ -32,7 +32,7 @@ public class EXCELParser {
|
||||||
|
|
||||||
XSSFSheet sheet = wb.getSheet(sheetName);
|
XSSFSheet sheet = wb.getSheet(sheetName);
|
||||||
|
|
||||||
if(sheetName == null){
|
if (sheetName == null) {
|
||||||
throw new RuntimeException("Sheet name " + sheetName + " not present in current file");
|
throw new RuntimeException("Sheet name " + sheetName + " not present in current file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,10 @@
|
||||||
<name>outputPath</name>
|
<name>outputPath</name>
|
||||||
<description>path where to store the action set</description>
|
<description>path where to store the action set</description>
|
||||||
</property>
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>sheetName</name>
|
||||||
|
<description>the name of the sheet to read</description>
|
||||||
|
</property>
|
||||||
</parameters>
|
</parameters>
|
||||||
|
|
||||||
<start to="deleteoutputpath"/>
|
<start to="deleteoutputpath"/>
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class EXCELParserTest {
|
||||||
|
|
||||||
private static Path workingDir;
|
private static Path workingDir;
|
||||||
private HttpConnector httpConnector = new HttpConnector();
|
private HttpConnector httpConnector = new HttpConnector();
|
||||||
private static final String URL = "http://cordis.europa.eu/data/reference/cordisref-H2020topics.xlsx";
|
private static final String URL = "https://cordis.europa.eu/data/reference/cordisref-h2020topics.xlsx";
|
||||||
|
|
||||||
@BeforeAll
|
@BeforeAll
|
||||||
public static void beforeAll() throws IOException {
|
public static void beforeAll() throws IOException {
|
||||||
|
@ -36,9 +36,11 @@ public class EXCELParserTest {
|
||||||
EXCELParser excelParser = new EXCELParser();
|
EXCELParser excelParser = new EXCELParser();
|
||||||
|
|
||||||
List<Object> pl = excelParser
|
List<Object> pl = excelParser
|
||||||
.parse(httpConnector.getInputSourceAsStream(URL), "eu.dnetlib.dhp.actionmanager.project.utils.ExcelTopic");
|
.parse(
|
||||||
|
httpConnector.getInputSourceAsStream(URL), "eu.dnetlib.dhp.actionmanager.project.utils.EXCELTopic",
|
||||||
|
"Topics");
|
||||||
|
|
||||||
Assertions.assertEquals(3837, pl.size());
|
Assertions.assertEquals(3878, pl.size());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue