refactoring
This commit is contained in:
parent
416bda6066
commit
3dca586b3b
|
@ -1,30 +1,17 @@
|
||||||
|
|
||||||
package eu.dnetlib.dhp.actionmanager.project;
|
package eu.dnetlib.dhp.actionmanager.project;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.apache.spark.api.java.function.FilterFunction;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.BeforeAll;
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import eu.dnetlib.dhp.actionmanager.project.utils.CSVParser;
|
||||||
|
|
||||||
import eu.dnetlib.dhp.actionmanager.project.csvutils.CSVParser;
|
|
||||||
import eu.dnetlib.dhp.actionmanager.project.csvutils.CSVProgramme;
|
|
||||||
|
|
||||||
public class CSVParserTest {
|
public class CSVParserTest {
|
||||||
|
|
||||||
private static Path workingDir;
|
|
||||||
|
|
||||||
@BeforeAll
|
|
||||||
public static void beforeAll() throws IOException {
|
|
||||||
workingDir = Files.createTempDirectory(CSVParserTest.class.getSimpleName());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void readProgrammeTest() throws Exception {
|
public void readProgrammeTest() throws Exception {
|
||||||
|
@ -37,9 +24,10 @@ public class CSVParserTest {
|
||||||
|
|
||||||
CSVParser csvParser = new CSVParser();
|
CSVParser csvParser = new CSVParser();
|
||||||
|
|
||||||
List<Object> pl = csvParser.parse(programmecsv, "eu.dnetlib.dhp.actionmanager.project.csvutils.CSVProgramme");
|
List<Object> pl = csvParser.parse(programmecsv, "eu.dnetlib.dhp.actionmanager.project.utils.CSVProgramme");
|
||||||
|
|
||||||
System.out.println(pl.size());
|
Assertions.assertEquals(24, pl.size());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue