import unittest

from algs06_multiplication.mult import create_pair, mult_pair, create_random_pair


class TestMultiplication(unittest.TestCase):
    def test_mult(self):
        (up, down) = create_pair(5)
        self.assertEqual(12345, up)
        self.assertEqual(98765, down)
        (up, down) = create_pair(12)
        self.assertEqual(123456789123, up)
        self.assertEqual(987654321987, down)
        self.assertEqual(77, mult_pair([7, 11]))
        (up, down) = create_random_pair(12)
        self.assertTrue(100000000000 < up < 999999999999)
        self.assertTrue(100000000000 < down < 999999999999)


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