import unittest
from modelverse_kernel.main import ModelverseKernel

class TestUtility(unittest.TestCase):
    def test_overlap_normal(self):
        c = ModelverseKernel(0).find_overlapping([1, 2, 3], [2, 4])
        self.assertEquals(c, 2)

    def test_overlap_none_empty(self):
        try:
            ModelverseKernel(0).find_overlapping([], [2, 4])
            self.fail() # pragma: no cover
        except:
            pass

    def test_overlap_none(self):
        try:
            ModelverseKernel(0).find_overlapping([1, 3], [2, 4, 5])
            self.fail() # pragma: no cover
        except:
            pass

    def test_overlap_multi(self):
        try:
            ModelverseKernel(0).find_overlapping([1, 2, 3], [2, 4, 1])
            self.fail() # pragma: no cover
        except:
            pass
