diff --git a/Projet.iml b/Projet.iml
index c90834f..771c910 100644
--- a/Projet.iml
+++ b/Projet.iml
@@ -7,5 +7,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UML/classes.puml b/UML/classes.puml
index f860774..e48eb5d 100644
--- a/UML/classes.puml
+++ b/UML/classes.puml
@@ -46,7 +46,7 @@ namespace ecoparasite {
namespace ecoparasite.poissons {
class Poisson {
- - String specie
+ - String id
- Double length
- Double weight
- Double infestation
diff --git a/data/Campagne/merlu2018_75164.csv b/data/Campagne/merlu2018_75164.csv
index a42edc6..7fb005a 100644
--- a/data/Campagne/merlu2018_75164.csv
+++ b/data/Campagne/merlu2018_75164.csv
@@ -1,4 +1,4 @@
-nom.merlu;m.size (mm);number of Anisakis sp L3;m.d15N (‰);m.d13C (‰);m.C/N;m.MeHg (ng g-1 dw);m.IHg (ng g-1 dw);m.THg (ng g-1 dw);m.PCB 101 (ng g-1 dw);m.PCB 118 (ng g-1 dw);m.PCB 138 (ng g-1 dw);m.PCB 149 (ng g-1 dw);m.PCB 153 (ng g-1 dw);m.PCB 180 (ng g-1 dw);m.PCB 194 (ng g-1 dw);m.HHCB (ng g-1 dw);m.AHTN (ng g-1 dw);m.EHMC (ng g-1 dw);;a.d15N (‰);a.d13C (‰);a.CN;a.MeHg (ng g-1 dw);a.IHg (ng g-1 dw);a.THg (ng g-1 dw);a.PCB 101 (ng g-1 dw);a.PCB 118 (ng g-1 dw);a.PCB 138 (ng g-1 dw);a.PCB 149 (ng g-1 dw);a.PCB 153 (ng g-1 dw);a.PCB 180 (ng g-1 dw);a.PCB 194 (ng g-1 dw);a.HHCB (ng g-1 dw);a.AHTN (ng g-1 dw);a.OC (ng g-1 dw)
+nom.merlu;m.size (mm);number of Anisakis sp L3;m.d15N (‰);m.d13C (‰);m.C/N;m.MeHg (ng g-1 dw);m.IHg (ng g-1 dw);m.THg (ng g-1 dw);m.PCB 101 (ng g-1 dw);m.PCB 118 (ng g-1 dw);m.PCB 138 (ng g-1 dw);m.PCB 149 (ng g-1 dw);m.PCB 153 (ng g-1 dw);m.PCB 180 (ng g-1 dw);m.PCB 194 (ng g-1 dw);m.HHCB (ng g-1 dw);m.AHTN (ng g-1 dw);m.EHMC (ng g-1 dw);;a.d15N (‰);a.d13C (‰);a.CN;a.MeHg (ng g-1 dw);a.IHg (ng g-1 dw);a.THg (ng g-1 dw);a.PCB 101 (ng g-1 dw);a.PCB 118 (ng g-1 dw);a.PCB 138 (ng g-1 dw);a.PCB 149 (ng g-1 dw);a.PCB 153 (ng g-1 dw);a.PCB 180 (ng g-1 dw);a.PCB 194 (ng g-1 dw);a.HHCB (ng g-1 dw);a.AHTN (ng g-1 dw);a.OC (ng g-1 dw)
150318 HKE01;425;237;13.36;-18.23;3.10;610.21;244.26;854.48;2.85;1.59;28.78;9.10;32.84;22.60;3.40;1.26; parse(RawData data);
+ public static HashSet parse(RawData data) throws RawDataOverflow {
+ return null;
+ }
}
diff --git a/src/ecoparasite/input/InputFactory.java b/src/ecoparasite/input/InputFactory.java
index 23e30a7..413a866 100644
--- a/src/ecoparasite/input/InputFactory.java
+++ b/src/ecoparasite/input/InputFactory.java
@@ -18,6 +18,7 @@ public class InputFactory {
final public static String DATA_MACKEREL = "Campagne/mackerel.97442.csv";
final public static String DATA_MERLU = "Campagne/merlu2018_75164.csv";
+ final public static String DATA_PARASITES_PERU = "Combinés/ParasitesPeru2021.csv";
/**
* Construit le chemin vers le fichier de données voulu.
diff --git a/src/ecoparasite/input/RawData.java b/src/ecoparasite/input/RawData.java
index 48d7d3d..7e5c470 100644
--- a/src/ecoparasite/input/RawData.java
+++ b/src/ecoparasite/input/RawData.java
@@ -110,7 +110,7 @@ public class RawData {
HashMap entry = new HashMap<>();
for( ArrayList row : data ){
- if( index > row.size()){
+ if( index >= row.size()){
throw new RawDataOverflow( index, row.size() );
}
entry.put( row.getFirst(), row.get( index ) );
diff --git a/src/ecoparasite/poisson/Mackerel.java b/src/ecoparasite/poisson/Mackerel.java
index af9ae3c..c5bd16c 100644
--- a/src/ecoparasite/poisson/Mackerel.java
+++ b/src/ecoparasite/poisson/Mackerel.java
@@ -2,24 +2,47 @@ package ecoparasite.poisson;
import ecoparasite.input.DataParsing;
import ecoparasite.input.RawData;
+import ecoparasite.input.RawDataOverflow;
+import java.util.HashMap;
import java.util.HashSet;
+import static java.lang.Double.valueOf;
+
/**
* Hérite de Poisson.
* Ajoute les fonctions de Parsing liés aux données collectées sur le Mackerel.
*/
public class Mackerel extends Poisson implements DataParsing {
- public Mackerel(String species, Double length, Double infestation) {
- super(species, length, null, infestation);
+
+ /**
+ * Constructeur de Mackerel
+ * @param length
+ * @param infestation
+ */
+ public Mackerel(String id, Double length, Double infestation) {
+ super(id, length, null, infestation);
}
- @Override
- public HashSet parse(RawData data) {
+ /**
+ * Implémentation de la fonction parse de Dataparsing
+ * @param data
+ * @return tableau des poissons
+ */
+ public static HashSet parse(RawData data) throws RawDataOverflow {
+
+ HashMap temp = new HashMap<>();
HashSet fishSet;
fishSet = new HashSet<>();
+ for (int i = 0; i < data.getData().getFirst().size(); i++) {
+ temp = data.getEntry(i);
+ Poisson newP = new Mackerel(temp.get("Sample_code"),valueOf(temp.get("StandardLength")),valueOf(temp.get("NParasitesViscera")));
+
+ fishSet.add(newP);
+ }
+
return fishSet;
}
diff --git a/src/ecoparasite/poisson/Merlu.java b/src/ecoparasite/poisson/Merlu.java
index 8a0b988..b81f23f 100644
--- a/src/ecoparasite/poisson/Merlu.java
+++ b/src/ecoparasite/poisson/Merlu.java
@@ -2,9 +2,13 @@ package ecoparasite.poisson;
import ecoparasite.input.DataParsing;
import ecoparasite.input.RawData;
+import ecoparasite.input.RawDataOverflow;
+import java.util.HashMap;
import java.util.HashSet;
+import static java.lang.Double.valueOf;
+
/**
* Hérite de Poisson.
* Ajoute les fonctions de Parsing liés aux données collectées sur le Merlu.
@@ -16,8 +20,8 @@ public class Merlu extends Poisson implements DataParsing {
* @param length Un Wrapper Double representant la longueur/taille du poisson
* @param infestation Un Wrapper Double representant le taux de parasite du poisson
*/
- public Merlu(Double length, Double infestation) {
- super("Merlu", length, null, infestation);
+ public Merlu(String id, Double length, Double infestation) {
+ super(id, length, null, infestation);
}
/**
@@ -25,12 +29,20 @@ public class Merlu extends Poisson implements DataParsing {
* @param data
* @return tableau des poissons
*/
- @Override
- public HashSet parse(RawData data) { //TODO
+ public static HashSet parse(RawData data) throws RawDataOverflow {
+
+ HashMap temp = new HashMap<>();
HashSet fishSet;
fishSet = new HashSet<>();
+ for (int i = 0; i < data.getData().getFirst().size(); i++) {
+ temp = data.getEntry(i);
+ Poisson newP = new Merlu(temp.get("nom.merlu"),valueOf(temp.get("m.size (mm)")),valueOf(temp.get("number of Anisakis sp L3")));
+
+ fishSet.add(newP);
+ }
+
return fishSet;
}
diff --git a/src/ecoparasite/poisson/Poisson.java b/src/ecoparasite/poisson/Poisson.java
index dcde266..ae70357 100644
--- a/src/ecoparasite/poisson/Poisson.java
+++ b/src/ecoparasite/poisson/Poisson.java
@@ -8,7 +8,7 @@ import java.util.HashSet;
*/
public class Poisson{
- private String specie;
+ private String id;
private Double length;
private Double weight;
private Double infestation;
@@ -16,13 +16,13 @@ public class Poisson{
/**
* Constructeur de l'objet Poisson
- * @param specie Une String representant l'espece du poisson
+ * @param id Une String representant l'espece du poisson
* @param length Un Wrapper Double representant la longueur/taille du poisson
* @param weight Un Wrapper Double representant le poids du poisson
* @param infestation Un Wrapper Double representant le taux de parasite du poisson
*/
- public Poisson(String specie, Double length, Double weight, Double infestation){
- this.specie = specie;
+ public Poisson(String id, Double length, Double weight, Double infestation){
+ this.id = id;
this.length = length;
this.weight = weight;
this.infestation = infestation;
@@ -30,11 +30,11 @@ public class Poisson{
}
/**
- * Getter de l'attribut specie
- * @return La string de l'attribut specie
+ * Getter de l'attribut Id
+ * @return La string de l'attribut Id
*/
- public String getSpecie() {
- return specie;
+ public String getId() {
+ return id;
}
/**
@@ -67,7 +67,7 @@ public class Poisson{
*/
@Override
public String toString(){
- String result = "[ %5s : %4d mm, %4d g, %4d taux d'infestation ]";
- return String.format(result, this.getClass().getSimpleName(), this.getLength(), this.getWeight(), this.getInfestation());
+ String result = "[ %5s : %4f mm, %4f g, %4f taux d'infestation ]";
+ return String.format(result, this.getClass().getSimpleName(), this.getLength(), this.getWeight(), this.getInfestation() );
}
}
diff --git a/src/ecoparasite/population/Population.java b/src/ecoparasite/population/Population.java
new file mode 100644
index 0000000..51404be
--- /dev/null
+++ b/src/ecoparasite/population/Population.java
@@ -0,0 +1,50 @@
+ package ecoparasite.population;
+
+ import java.util.HashMap;
+ import java.util.HashSet;
+
+ public class Population {
+
+ private String id;
+ private PopulationArgs total;
+ private HashMap perYear;
+
+ public Population(String id, PopulationArgs total, HashMap perYear) {
+ this.id = id;
+ this.total = total;
+ this.perYear = perYear;
+ }
+
+ public Population(String id, PopulationArgs total) {
+ this.id = id;
+ this.total = total;
+ this.perYear = new HashMap<>();
+ }
+
+ public Population(String id) {
+ this.id = id;
+ this.total = null;
+ this.perYear = new HashMap<>();
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public PopulationArgs getTotal() {
+ return total;
+ }
+
+ public HashMap getPerYear() {
+ return perYear;
+ }
+
+ public void setTotal(PopulationArgs total) {
+ this.total = total;
+ }
+
+ public void setPerYear(HashMap perYear) {
+ this.perYear = perYear;
+ }
+
+ }
diff --git a/src/ecoparasite/population/PopulationArgInterval.java b/src/ecoparasite/population/PopulationArgInterval.java
new file mode 100644
index 0000000..f85e9dc
--- /dev/null
+++ b/src/ecoparasite/population/PopulationArgInterval.java
@@ -0,0 +1,60 @@
+package ecoparasite.population;
+
+public class PopulationArgInterval {
+
+ private Double min;
+ private Double max;
+
+ private Double mean;
+
+ public PopulationArgInterval(Double min, Double max, Double mean) {
+ this.min = min;
+ this.max = max;
+ this.mean = mean;
+ }
+ public PopulationArgInterval(Double min, Double max) {
+ this.min = min;
+ this.max = max;
+ this.mean = ( this.max + this.min ) / 2;
+ }
+
+ public Double getMin() {
+ return this.min;
+ }
+ public Double getMax() {
+ return this.max;
+ }
+ public Double getMean() {
+ return this.mean;
+ }
+
+ public Double transformToDouble(){
+ if( this.min == this.max )
+ return this.min;
+ return this.mean;
+ }
+
+ public static PopulationArgInterval fromString( String rawValue ){
+
+ if( rawValue.contains( "±" ) ){ // Plus ou moins.
+
+ String[] numbers = rawValue.split("±");
+ Double mean = Double.parseDouble(numbers[0].trim());
+ Double interval = Double.parseDouble(numbers[1].trim());
+ return new PopulationArgInterval(mean - interval, mean + interval, mean);
+
+ } else if( rawValue.contains( "-" ) ){ // Entre.
+
+ String[] numbers = rawValue.split("-");
+ Double min = Double.parseDouble(numbers[0].trim());
+ Double max = Double.parseDouble(numbers[1].trim());
+ return new PopulationArgInterval(min, max);
+
+ } else {
+ Double number = Double.parseDouble(rawValue);
+ return new PopulationArgInterval(number, number);
+ }
+
+ }
+
+}
diff --git a/src/ecoparasite/population/PopulationArgs.java b/src/ecoparasite/population/PopulationArgs.java
new file mode 100644
index 0000000..5c788ce
--- /dev/null
+++ b/src/ecoparasite/population/PopulationArgs.java
@@ -0,0 +1,124 @@
+package ecoparasite.population;
+
+public class PopulationArgs {
+
+ private int year;
+
+ private int number;
+ private PopulationArgInterval length;
+ private PopulationArgInterval width;
+ private PopulationArgInterval prevalence;
+ private PopulationArgInterval ic;
+ private Double intensity;
+ private Double abondance;
+
+ public PopulationArgs(
+ int N,
+ PopulationArgInterval length,
+ PopulationArgInterval width,
+ PopulationArgInterval prevalence,
+ PopulationArgInterval ic,
+ Double intensity,
+ Double abondance
+ ){
+ this.year = 0;
+ this.number = N;
+ this.length = length;
+ this.width = width;
+ this.prevalence = prevalence;
+ this.ic = ic;
+ this.intensity = intensity;
+ this.abondance = abondance;
+ }
+
+ public PopulationArgs(
+ int year,
+ int N,
+ PopulationArgInterval length,
+ PopulationArgInterval width,
+ PopulationArgInterval prevalence,
+ PopulationArgInterval ic,
+ Double intensity,
+ Double abondance
+ ){
+ this.year = year;
+ this.number = N;
+ this.length = length;
+ this.width = width;
+ this.prevalence = prevalence;
+ this.ic = ic;
+ this.intensity = intensity;
+ this.abondance = abondance;
+ }
+
+ public PopulationArgs(
+ int year
+ ){
+ this.year = year;
+ }
+
+ public PopulationArgs(){
+ this.year = 0;
+ }
+
+ public int getYear() {
+ return year;
+ }
+
+ public int getNumber() {
+ return number;
+ }
+
+ public PopulationArgInterval getLength() {
+ return length;
+ }
+
+ public PopulationArgInterval getWidth() {
+ return width;
+ }
+
+ public PopulationArgInterval getPrevalence() {
+ return prevalence;
+ }
+
+ public PopulationArgInterval getIc() {
+ return ic;
+ }
+
+ public Double getIntensity() {
+ return intensity;
+ }
+
+ public Double getAbondance() {
+ return abondance;
+ }
+
+ public void setNumber(int number) {
+ this.number = number;
+ }
+
+ public void setLength(PopulationArgInterval length) {
+ this.length = length;
+ }
+
+ public void setWidth(PopulationArgInterval width) {
+ this.width = width;
+ }
+
+ public void setPrevalence(PopulationArgInterval prevalence) {
+ this.prevalence = prevalence;
+ }
+
+ public void setIc(PopulationArgInterval ic) {
+ this.ic = ic;
+ }
+
+ public void setIntensity(Double intensity) {
+ this.intensity = intensity;
+ }
+
+ public void setAbondance(Double abondance) {
+ this.abondance = abondance;
+ }
+
+}
diff --git a/src/ecoparasite/population/PopulationParsing.java b/src/ecoparasite/population/PopulationParsing.java
new file mode 100644
index 0000000..7813d62
--- /dev/null
+++ b/src/ecoparasite/population/PopulationParsing.java
@@ -0,0 +1,97 @@
+package ecoparasite.population;
+
+import ecoparasite.input.RawData;
+import ecoparasite.input.RawDataOverflow;
+
+import java.util.HashMap;
+import java.util.HashSet;
+
+public class PopulationParsing {
+
+ public static HashMap parseParasitesPeru(RawData peruRawData ){
+
+ HashMap response = new HashMap<>();
+
+ int index = 1;
+ try {
+ while(true){ // Tant que l'on ne fait pas de débordements d'entrées.
+
+ HashMap fields = peruRawData.getEntry(index);
+
+ String espece = fields.get("Espèce");
+ System.out.println(espece);
+ String parametre = fields.get("Paramètre");
+
+ Population population = null;
+ if( response.containsKey( espece ) ){
+ population = response.get(espece);
+ } else {
+ population = new Population(espece);
+ response.put(espece, population);
+ }
+
+ // Traiter le total
+ if( fields.containsKey( "Total" ) ){
+ if( population.getTotal() == null ){
+ population.setTotal( new PopulationArgs() );
+ }
+ PopulationParsing.applyValueForParasitesPeru( population.getTotal(), parametre, fields.get("Total") );
+ }
+
+ // Traiter les années.
+ for( String k: fields.keySet() ){
+ if( k.equals( "Total" ) || k.equals("Paramètre") || k.equals("Espèce") ) // Déjà traité. Pas des années.
+ continue;
+
+ Integer year = Integer.parseInt(k);
+
+ PopulationArgs popArgsYear = null;
+ if( !population.getPerYear().containsKey(year) ){
+ popArgsYear = new PopulationArgs( year );
+ population.getPerYear().put(year, popArgsYear);
+ } else {
+ popArgsYear = population.getPerYear().get(year);
+ }
+
+ PopulationParsing.applyValueForParasitesPeru( popArgsYear, parametre, fields.get(k) );
+ }
+
+ response.put( espece, population );
+ index++;
+ }
+ } catch (RawDataOverflow e){
+ // Stop.
+ }
+
+ return response;
+ }
+
+ private static void applyValueForParasitesPeru( PopulationArgs populationArgs, String column, String value ){
+ switch( column ){
+ case "N":
+ populationArgs.setNumber(Integer.parseInt(value));
+ break;
+ case "Longueur moyenne ± SD (cm)":
+ populationArgs.setLength( PopulationArgInterval.fromString( value ) );
+ break;
+ case "Poids moyen ± SD (g)":
+ populationArgs.setWidth( PopulationArgInterval.fromString( value ) );
+ break;
+ case "Prévalence (%)":
+ populationArgs.setPrevalence( PopulationArgInterval.fromString( value ) );
+ break;
+ case "IC 95%":
+ populationArgs.setIc( PopulationArgInterval.fromString( value ) );
+ break;
+ case "Intensité moyenne (étendue)":
+ populationArgs.setIntensity( Double.parseDouble( value.split( " " )[0] ) );
+ break;
+ case "Abondance moyenne":
+ populationArgs.setAbondance( Double.parseDouble( value ) );
+ break;
+ default:
+ break;
+ }
+ }
+
+}
diff --git a/tests/ecoparasite/input/InputFactoryTest.java b/tests/ecoparasite/input/InputFactoryTest.java
index 84dce59..070d267 100644
--- a/tests/ecoparasite/input/InputFactoryTest.java
+++ b/tests/ecoparasite/input/InputFactoryTest.java
@@ -1,21 +1,36 @@
package ecoparasite.input;
+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;
import org.junit.jupiter.api.Test;
-import java.io.IOException;
-
-import static org.junit.jupiter.api.Assertions.*;
-
class InputFactoryTest {
- // TODO : Test a être effectué par Sébastien.
- @Test
- void readFile() throws InputFileException, RawDataOverflow {
- RawData r = InputFactory.readData( InputFactory.DATA_MACKEREL );
- System.out.println( r );
- System.out.println( r.getColumnsNames() );
- System.out.println( r.getDataFromColumn( "Sample_codE" ) );
- System.out.println( r.getEntry( 2 ) );
+ @org.junit.jupiter.api.Test
+ void buildDataPath() {
+
+ 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 {
+ RawData test = InputFactory.readData("test.csv");
+
+ System.out.println(test.getData());
+
+ }
+
+ @org.junit.jupiter.api.Test
+ void testReadData() {
}
}
\ No newline at end of file
diff --git a/tests/ecoparasite/input/RawDataTest.java b/tests/ecoparasite/input/RawDataTest.java
new file mode 100644
index 0000000..0181560
--- /dev/null
+++ b/tests/ecoparasite/input/RawDataTest.java
@@ -0,0 +1,42 @@
+package ecoparasite.input;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import java.util.HashSet;
+
+class RawDataTest {
+
+
+ @Test
+ void getColumnsNames() throws InputFileException {
+ RawData test = InputFactory.readData("test.csv");
+
+ HashSet d = new HashSet<>();
+
+ for (int i = 0; i < test.getData().size(); i++){
+ d.add(test.getData().get(i).getFirst());
+ }
+
+ System.out.println(test.getColumnsNames());
+ System.out.println(d);
+
+ assertIterableEquals(test.getColumnsNames(),d);
+ }
+
+ @Test
+ void getDataFromColumn() throws InputFileException {
+ RawData test = InputFactory.readData("test.csv");
+
+ System.out.println(test.getDataFromColumn("Sample_code"));
+
+ }
+
+ @Test
+ void getEntry() throws InputFileException, RawDataOverflow {
+ RawData test = InputFactory.readData("test.csv");
+
+ System.out.println(test.getEntry(2));
+ }
+}
\ No newline at end of file
diff --git a/tests/ecoparasite/poisson/MackerelTest.java b/tests/ecoparasite/poisson/MackerelTest.java
new file mode 100644
index 0000000..047d4cb
--- /dev/null
+++ b/tests/ecoparasite/poisson/MackerelTest.java
@@ -0,0 +1,24 @@
+package ecoparasite.poisson;
+
+import ecoparasite.input.InputFactory;
+import ecoparasite.input.InputFileException;
+import ecoparasite.input.RawData;
+import ecoparasite.input.RawDataOverflow;
+import org.junit.jupiter.api.Test;
+
+import java.util.HashSet;
+
+class MackerelTest {
+
+ @Test
+ void parse() throws InputFileException, RawDataOverflow {
+
+ RawData test = InputFactory.readData( InputFactory.DATA_MACKEREL );
+ HashSet fishs = Mackerel.parse( test );
+
+ for( Poisson poisson : fishs){
+ System.out.println(poisson);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/tests/ecoparasite/poisson/MerluTest.java b/tests/ecoparasite/poisson/MerluTest.java
new file mode 100644
index 0000000..79545d8
--- /dev/null
+++ b/tests/ecoparasite/poisson/MerluTest.java
@@ -0,0 +1,26 @@
+package ecoparasite.poisson;
+
+import ecoparasite.input.InputFactory;
+import ecoparasite.input.InputFileException;
+import ecoparasite.input.RawData;
+import ecoparasite.input.RawDataOverflow;
+import org.junit.jupiter.api.Test;
+
+import java.util.HashSet;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class MerluTest {
+
+ @Test
+ void parse() throws InputFileException, RawDataOverflow {
+
+ RawData test = InputFactory.readData( InputFactory.DATA_MERLU );
+ HashSet fishs = Merlu.parse( test );
+
+ for( Poisson poisson : fishs){
+ System.out.println(poisson);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/tests/ecoparasite/population/PopulationParsingTest.java b/tests/ecoparasite/population/PopulationParsingTest.java
new file mode 100644
index 0000000..4be0184
--- /dev/null
+++ b/tests/ecoparasite/population/PopulationParsingTest.java
@@ -0,0 +1,22 @@
+package ecoparasite.population;
+
+import ecoparasite.input.InputFactory;
+import ecoparasite.input.InputFileException;
+import ecoparasite.input.RawData;
+import ecoparasite.input.RawDataOverflow;
+import org.junit.jupiter.api.Test;
+
+import java.util.HashMap;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class PopulationParsingTest {
+
+ @Test
+ void parseParasitesPeru() throws InputFileException, RawDataOverflow {
+
+ RawData parasitesPeru = InputFactory.readData( InputFactory.DATA_PARASITES_PERU, "," );
+ HashMap populations = PopulationParsing.parseParasitesPeru( parasitesPeru );
+ System.out.println( populations);
+ }
+}
\ No newline at end of file