package org.studiorailgun.transfer;

import static org.junit.jupiter.api.Assertions.*;

import java.util.List;

import org.junit.Test;
import org.studiorailgun.Globals;
import org.studiorailgun.ai.conversation.evaluators.transfer.TransferEval;
import org.studiorailgun.ai.conversation.parser.NLPParser;
import org.studiorailgun.ai.conversation.tracking.Quote;
import org.studiorailgun.ai.conversation.web.ConversationQuery;
import org.studiorailgun.ai.knowledge.Node;
import org.studiorailgun.ai.linguistics.NameQuery;

/**
 * Tests for evaluating transfer statements
 */
public class TransferEvaluationTests {
    
    @Test
    public void testEval1(){
        Globals.init("./data/webs/test/web.json");
        Quote input = new Quote("My name is John.");
        NLPParser.parse(input);

        Globals.conversation.addQuote(ConversationQuery.getOtherParticipant(), input);

        TransferEval.evaluate(Globals.conversation, input, input.getSentences().get(0));

        //search for the name being assigned in the knowledge web
        Node otherParticipant = ConversationQuery.getOtherParticipant();
        List<Node> names = NameQuery.getNames(otherParticipant);
        // assertEquals(names.get(0).getName(),"John");
    }

}
