package org.aksw.limes.core.io.serializer;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.aksw.limes.core.datastrutures.EvaluationRun;
import org.aksw.limes.core.datastrutures.TaskAlgorithm;
import org.aksw.limes.core.datastrutures.TaskData;
import org.aksw.limes.core.evaluation.AlgorithmsInitTest;
import org.aksw.limes.core.evaluation.DatasetsInitTest;
import org.aksw.limes.core.evaluation.EvaluatorsInitTest;
import org.aksw.limes.core.evaluation.evaluator.Evaluator;
import org.aksw.limes.core.evaluation.evaluator.EvaluatorType;
import org.aspectj.lang.annotation.Before;
import org.junit.Test;

public class EvaluationSerializerTest {

    List<EvaluationRun> results = new ArrayList<EvaluationRun>();
    private void init()
    {
        
        Map<EvaluatorType, Double> scores = new LinkedHashMap<EvaluatorType, Double>();
        scores.put(EvaluatorType.PRECISION, 0.8);
        scores.put(EvaluatorType.RECALL, 0.9);
        scores.put(EvaluatorType.F_MEASURE, 0.98);
        
        EvaluationRun er1 = new EvaluationRun("EAGLE","UNSUPERVISED", "PERSON1", scores);
        EvaluationRun er2 = new EvaluationRun("WOMBATSIMPLE", "SUPERVISED_BATCH","PERSON1", scores);
        EvaluationRun er3 = new EvaluationRun("WOMBATCOMPLETE","SUPERVISED_ACTIVE" ,"PERSON1", scores);
        
        results.add(er1);
        results.add(er2);
        results.add(er3);

    }
    @Test
    public void test() {
        init();
        
        try {
            EvaluationSerlializer evaSer = new EvaluationSerlializer();
            evaSer.setSeparator(",");
            evaSer.writeToFile(results, "resources/evauationResults.csv");
            evaSer.close();
        } catch (Exception e) {
            System.out.println(e.getMessage());
            assertTrue(false);
        }
        assertTrue(true);
    }
    


}

@@ -180,30 +180,8 @@
 Map;
-%0Aimport java.util.Set;
 %0A%0Aim
@@ -238,346 +238,8 @@
 un;%0A
-import org.aksw.limes.core.datastrutures.TaskAlgorithm;%0Aimport org.aksw.limes.core.datastrutures.TaskData;%0Aimport org.aksw.limes.core.evaluation.AlgorithmsInitTest;%0Aimport org.aksw.limes.core.evaluation.DatasetsInitTest;%0Aimport org.aksw.limes.core.evaluation.EvaluatorsInitTest;%0Aimport org.aksw.limes.core.evaluation.evaluator.Evaluator;%0A
 impo
@@ -301,51 +301,8 @@
 pe;%0A
-import org.aspectj.lang.annotation.Before;%0A
 impo

fix ResilientSparqlQueryModuleTest