diff --git a/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/EXCELParserTest.java b/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/EXCELParserTest.java index 11ee0eef15..c64459472d 100644 --- a/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/EXCELParserTest.java +++ b/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/EXCELParserTest.java @@ -7,6 +7,7 @@ import java.nio.file.Path; import java.util.List; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; @@ -35,52 +36,8 @@ public class EXCELParserTest { List pl = excelParser .parse(httpConnector.getInputSourceAsStream(URL), "eu.dnetlib.dhp.actionmanager.project.utils.ExcelTopic"); - System.out.println(pl.size()); + Assertions.assertEquals(3837, pl.size()); + -// OPCPackage pkg = OPCPackage.open(httpConnector.getInputSourceAsStream(URL)); -// XSSFWorkbook wb = new XSSFWorkbook(pkg); -// -// XSSFSheet sheet = wb.getSheet("cordisref-H2020topics"); -// -// DataFormatter dataFormatter = new DataFormatter(); -// Iterator rowIterator = sheet.rowIterator(); -// List headers = new ArrayList<>(); -// int count = 0; -// while (rowIterator.hasNext() && count <= 10) { -// Row row = rowIterator.next(); -// -// -// if(count == 0){ -// // Now let's iterate over the columns of the current row -// Iterator cellIterator = row.cellIterator(); -// -// while(cellIterator.hasNext()){ -// Cell cell = cellIterator.next(); -// headers.add(dataFormatter.formatCellValue(cell)); -// } -// }else{ -// Class clazz = Class.forName("eu.dnetlib.dhp.actionmanager.project.utils.EXCELTopic"); -// final Object cc = clazz.newInstance(); -// -// for(int i =0; i iterator = wb.sheetIterator(); -//// System.out.println("Retrieving Sheets using Iterator"); -//// while (iterator.hasNext()) { -//// Sheet sheet = iterator.next(); -//// System.out.println("=> " + sheet.getSheetName()); -//// } -// -// pkg.close(); } }