import unittest
from pytlex_core import TCSP_solver
from pytlex_core.Graph import Graph
from pytlex_tests import Testing_utilities


class TCSPTestCase(unittest.TestCase):

    # def test_case_1(self):
    #     linkset = []
    #     linkset.append(("a", "IBEFORE", "b"))
    #     linkset.append(("b", "ENDS", "c"))
    #     linkset.append(("a", "BEGINS", "c"))
    #
    #     solution = TCSP_solver.solve(linkset)
    #
    #     self.assertTrue(solution['1'] == ['c_minus', 'a_minus'])
    #     self.assertTrue(solution['2'] == ['a_plus', 'b_minus'])
    #     self.assertTrue(solution['3'] == ['c_plus', 'b_plus'])
    #
    # def test_case_2(self):
    #     linkset = []
    #     linkset.append(("a", "BEFORE", "b"))
    #
    #     solution = TCSP_solver.solve(linkset)
    #
    #     self.assertTrue(solution['1'] == ['a_minus'])
    #     self.assertTrue(solution['2'] == ['a_plus'])
    #     self.assertTrue(solution['3'] == ['b_minus'])
    #     self.assertTrue(solution['4'] == ['b_plus'])

    def test_on_graph_1(self):
        print(TCSP_solver.solve_graph(Testing_utilities.consistent_graph_1()))

    def test_on_graph_2(self):
        pass

    def test_on_graph_4(self):
        print(TCSP_solver.solve_graph(Testing_utilities.consistent_graph_4()))


if __name__ == '__main__':
    unittest.main()
