import unittest
from GestureRecognition.SimpleHandRecogniser import SimpleHandRecogniser
import cv2

class TestSimpleHandRecogniser(unittest.TestCase):

    def test_5_digits(self):
        self.assertEqual(self.recogniser_5.get_gesture(), 5)

    def test_3_digits(self):
        self.assertEqual(self.recogniser_3.get_gesture(), 3)

    def setUp(self):
        img_3 = cv2.imread("H:\car\GestureRecognition\IMG_0825.jpg")
        img_3 = cv2.resize(img_3, None, fx=0.1, fy=0.1, interpolation = cv2.INTER_AREA)
        self.recogniser_3 = SimpleHandRecogniser(img_3)

        img_5 = cv2.imread("H:\car\GestureRecognition\IMG_0818.png")
        img_5 = cv2.resize(img_5, None, fx=0.1, fy=0.1, interpolation = cv2.INTER_AREA)
        self.recogniser_5 = SimpleHandRecogniser(img_5)

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