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("testComplete.csv");

        HashSet<String> 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("testComplete.csv");

        System.out.println(test.getDataFromColumn("Sample_code"));

    }

    @Test
    void getEntry() throws InputFileException, RawDataOverflow {
        RawData test = InputFactory.readData("testComplete.csv");

        System.out.println(test.getEntry(2));
    }
}