package de.textmining.nerdle.question.answering;

import static org.junit.Assert.*;

import org.junit.BeforeClass;
import org.junit.Test;

import de.textmining.nerdle.database.DBFactProvider;
import de.textmining.nerdle.database.DBSingleton;
import de.textmining.nerdle.question.answering.fact.matcher.ExactQuestionFactMatcher;
import de.textmining.nerdle.question.answering.model.Answer;
import de.textmining.nerdle.question.answering.model.Question;
import de.textmining.nerdle.question.answering.question.parsing.ClearNLPQuestionParser;

public class MatchFactQuestionAnswererTest {

    private static QuestionAnswerer questionAnswerer;

    @BeforeClass
    public static void setup() {
        DBSingleton dbSingleton = new DBSingleton();

        ClearNLPQuestionParser questionParser = new ClearNLPQuestionParser();
        ExactQuestionFactMatcher questionFactMatcher = new ExactQuestionFactMatcher();
        DBFactProvider factProvider = new DBFactProvider(dbSingleton.getConnections().get("nerdle_test"));

        questionAnswerer = new MatchFactQuestionAnswerer(questionParser, questionFactMatcher, factProvider);
    }

    @Test
    public void test() {
        Question question = new Question("Which one has devoted her life to celibacy?");
        Answer answer = questionAnswerer.answer(question);
        
        assertEquals(0, answer.getAnswers().size());
    }
}

@@ -78,16 +78,38 @@
 ert.*;%0A%0A
+import java.io.File;%0A%0A
 import o
@@ -130,16 +130,16 @@
 eClass;%0A
-
 import o
@@ -554,16 +554,67 @@
 nParser;
+%0Aimport de.textmining.nerdle.utils.ResourceManager;
 %0A%0Apublic
@@ -808,20 +808,100 @@
 ngleton(
+ResourceManager.getResourcePath(File.separator + %22nerdle_test_config.properties%22)
 );%0A
-%0A
         
@@ -1311,16 +1311,29 @@
 oid test
+NoQuestionArg
 () %7B%0A   
@@ -1477,24 +1477,16 @@
 stion);%0A
-        
 %0A       

fix build 19