From 3dca586b3b27e9d9c04a0e9d8ed9be122af51176 Mon Sep 17 00:00:00 2001 From: "miriam.baglioni" Date: Thu, 1 Oct 2020 10:34:48 +0200 Subject: [PATCH] refactoring --- .../actionmanager/project/CSVParserTest.java | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/CSVParserTest.java b/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/CSVParserTest.java index 101ed5eea..3ec98262a 100644 --- a/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/CSVParserTest.java +++ b/dhp-workflows/dhp-aggregation/src/test/java/eu/dnetlib/dhp/actionmanager/project/CSVParserTest.java @@ -1,30 +1,17 @@ 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 org.apache.commons.io.IOUtils; -import org.apache.spark.api.java.function.FilterFunction; -import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import com.google.gson.Gson; - -import eu.dnetlib.dhp.actionmanager.project.csvutils.CSVParser; -import eu.dnetlib.dhp.actionmanager.project.csvutils.CSVProgramme; +import eu.dnetlib.dhp.actionmanager.project.utils.CSVParser; public class CSVParserTest { - private static Path workingDir; - - @BeforeAll - public static void beforeAll() throws IOException { - workingDir = Files.createTempDirectory(CSVParserTest.class.getSimpleName()); - - } @Test public void readProgrammeTest() throws Exception { @@ -37,9 +24,10 @@ public class CSVParserTest { CSVParser csvParser = new CSVParser(); - List pl = csvParser.parse(programmecsv, "eu.dnetlib.dhp.actionmanager.project.csvutils.CSVProgramme"); + List pl = csvParser.parse(programmecsv, "eu.dnetlib.dhp.actionmanager.project.utils.CSVProgramme"); - System.out.println(pl.size()); + Assertions.assertEquals(24, pl.size()); } + }