2026-03-18 16:01:20 +01:00
|
|
|
package ecoparasite.input;
|
|
|
|
|
|
2026-03-31 19:00:19 +02:00
|
|
|
import static ecoparasite.input.InputFactory.*;
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
|
|
|
|
|
|
|
|
|
import ecoparasite.input.InputFactory;
|
|
|
|
|
import ecoparasite.input.InputFileException;
|
|
|
|
|
import ecoparasite.input.RawData;
|
2026-03-18 16:01:20 +01:00
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
2026-03-31 19:00:19 +02:00
|
|
|
class InputFactoryTest {
|
2026-03-18 16:01:20 +01:00
|
|
|
|
2026-03-31 19:00:19 +02:00
|
|
|
@org.junit.jupiter.api.Test
|
|
|
|
|
void buildDataPath() {
|
2026-03-18 16:01:20 +01:00
|
|
|
|
2026-03-31 19:00:19 +02:00
|
|
|
String d = "data/Campagne/mackerel.97442.csv";
|
|
|
|
|
String e = "data/Campagne/merlu2018_75164.csv";
|
|
|
|
|
|
|
|
|
|
assertArrayEquals(d.toCharArray(), InputFactory.buildDataPath("Campagne/mackerel.97442.csv").toCharArray());
|
|
|
|
|
assertArrayEquals(e.toCharArray(), InputFactory.buildDataPath("Campagne/merlu2018_75164.csv").toCharArray());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@org.junit.jupiter.api.Test
|
|
|
|
|
void readData() throws InputFileException {
|
2026-04-01 16:20:41 +02:00
|
|
|
RawData test = InputFactory.readData("testComplete.csv");
|
2026-03-31 19:00:19 +02:00
|
|
|
|
|
|
|
|
System.out.println(test.getData());
|
|
|
|
|
|
|
|
|
|
}
|
2026-03-18 16:01:20 +01:00
|
|
|
|
2026-03-31 19:00:19 +02:00
|
|
|
@org.junit.jupiter.api.Test
|
|
|
|
|
void testReadData() {
|
2026-03-18 16:01:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|